Contact point between two potentially colliding objects in a Simulation.
More...
#include <GREM/physics/collision.hpp>
|
| Pair< Length< N > > | offsets |
| | Ordered pair of offsets from the objects' centers of mass to their respective surfaces where the contact point is located in world space at the start of the last simulation step.
|
| Pair< Length< N > > | localOffsets |
| | Ordered pair of offsets from the objects' centers of mass to their respective surfaces where the contact point is located in shape-local space at the time of impact.
|
| Scale< N > | tangent {} |
| | Unit vector in the separating plane of the collision, pointing in the direction of the objects' relative velocity at the contact point at the time of impact, projected onto the separating plane, in world space.
|
| LinearVelocity< N > | relativeVelocityInTangentSpace {} |
| | Relative velocity of the contact points along the tangent, bitangent and normal (TBN) directions at the start of the last simulation step (or along the tangent and normal directions in 2D).
|
| LinearMomentum< N > | momentumInTangentSpace {} |
| | Total correction momentum of this contact point along the tangent, bitangent and normal (TBN) directions (or along the tangent and normal directions in 2D).
|
| LinearImpulse< N > | impulseInTangentSpace {} |
| | Total correction impulse applied to this contact point along the tangent, bitangent and normal (TBN) directions in the last simulation step (or along the tangent and normal directions in 2D).
|
| LinearMomentum1D | restitutionMomentum {} |
| | Total restitution momentum of this contact point along the normal direction.
|
| LinearImpulse1D | restitutionImpulse {} |
| | Total restitution impulse applied to this contact point along the normal direction in the last simulation step.
|
template<size_t N>
struct grem::physics::ContactPoint< N >
Contact point between two potentially colliding objects in a Simulation.
- Template Parameters
-
| N | number of dimensions of the world space (must be 2 or 3). |
◆ getTangentSpaceBasis()
Get the tangent-space basis of this contact point given the manifold normal.
- Parameters
-
| normal | world-space normal of the contact manifold that contains this point. |
- Returns
- the tangent-space basis in world space as a TBN matrix (tangent, bitangent, normal) in 3D or a TN matrix (tangent, normal) in 2D.
◆ offsets
Ordered pair of offsets from the objects' centers of mass to their respective surfaces where the contact point is located in world space at the start of the last simulation step.
◆ localOffsets
Ordered pair of offsets from the objects' centers of mass to their respective surfaces where the contact point is located in shape-local space at the time of impact.
◆ tangent
Unit vector in the separating plane of the collision, pointing in the direction of the objects' relative velocity at the contact point at the time of impact, projected onto the separating plane, in world space.
- Note
- If collision detection was performed outside of a simulation step, the tangent will be zero.
◆ relativeVelocityInTangentSpace
Relative velocity of the contact points along the tangent, bitangent and normal (TBN) directions at the start of the last simulation step (or along the tangent and normal directions in 2D).
- Note
- If the contact was inactive in the last simulation step, this value will not be up-to-date.
◆ momentumInTangentSpace
Total correction momentum of this contact point along the tangent, bitangent and normal (TBN) directions (or along the tangent and normal directions in 2D).
- Note
- If the contact was inactive in the last simulation step, this value will not be up-to-date.
◆ impulseInTangentSpace
Total correction impulse applied to this contact point along the tangent, bitangent and normal (TBN) directions in the last simulation step (or along the tangent and normal directions in 2D).
- Note
- If the contact was inactive in the last simulation step, this value will not be up-to-date.
◆ restitutionMomentum
Total restitution momentum of this contact point along the normal direction.
- Note
- If the contact was inactive in the last simulation step, this value will not be up-to-date.
◆ restitutionImpulse
Total restitution impulse applied to this contact point along the normal direction in the last simulation step.
- Note
- If the contact was inactive in the last simulation step, this value will not be up-to-date.
The documentation for this struct was generated from the following file: