pure-cpp 1.0.0
A C++ physics simulation benchmark comparing performance with Python implementations
Model::CollisionContext Struct Reference

A data container to hold all relevant information for a single collision event. More...

#include <space.hpp>

Collaboration diagram for Model::CollisionContext:
Collaboration graph

Public Attributes

BodyProxyb1
 A proxy to the first body in the collision. More...
 
BodyProxyb2
 A proxy to the second body in the collision. More...
 
Vector3d nVec_
 The normalised vector pointing from body 1 to body 2. More...
 
Vector3d r1Vec_
 The vector from the centre of body 1 to the contact point. More...
 
Vector3d r2Vec_
 The vector from the centre of body 2 to the contact point. More...
 
Vector3d vRel_
 The relative velocity between the two bodies at the contact point. More...
 
double overlap_
 The penetration depth of the two bodies. More...
 

Detailed Description

A data container to hold all relevant information for a single collision event.

Definition at line 67 of file space.hpp.

Member Data Documentation

◆ b1

BodyProxy& Model::CollisionContext::b1

A proxy to the first body in the collision.

Definition at line 69 of file space.hpp.

◆ b2

BodyProxy& Model::CollisionContext::b2

A proxy to the second body in the collision.

Definition at line 71 of file space.hpp.

◆ nVec_

Vector3d Model::CollisionContext::nVec_

The normalised vector pointing from body 1 to body 2.

Definition at line 73 of file space.hpp.

◆ overlap_

double Model::CollisionContext::overlap_

The penetration depth of the two bodies.

Definition at line 82 of file space.hpp.

◆ r1Vec_

Vector3d Model::CollisionContext::r1Vec_

The vector from the centre of body 1 to the contact point.

Definition at line 75 of file space.hpp.

◆ r2Vec_

Vector3d Model::CollisionContext::r2Vec_

The vector from the centre of body 2 to the contact point.

Definition at line 77 of file space.hpp.

◆ vRel_

Vector3d Model::CollisionContext::vRel_

The relative velocity between the two bodies at the contact point.

Definition at line 80 of file space.hpp.


The documentation for this struct was generated from the following file: