public class ManifoldPoint
- Object
- ManifoldPoint
A manifold point is a contact point belonging to a contact manifold. It holds details related to the geometry and dynamics of the contact points. The local point usage depends on the manifold type:
e_circles: the local center of circleB
e_faceA: the local center of cirlceB or the clip point of polygonB
e_faceB: the clip point of polygonA
This structure is stored across time steps, so we keep it small.
Note: the impulses are used for internal caching and may not provide reliable contact forces, especially for high speed collisions.
Fields
public final Vec2 localPoint | usage depends on manifold type |
public float normalImpulse | the non-penetration impulse |
public float tangentImpulse | the friction impulse |
public final ContactID id | uniquely identifies a contact point between two shapes |
Constructors
public ManifoldPoint() | Blank manifold point with everything zeroed out. |
public ManifoldPoint(ManifoldPoint cp) | Creates a manifold point as a copy of the given point |
Methods
public void set(ManifoldPoint cp) | Sets this manifold point form the given one |
Inherited methods
Field details
localPoint
public final Vec2 localPointusage depends on manifold type
normalImpulse
public float normalImpulsethe non-penetration impulse
tangentImpulse
public float tangentImpulsethe friction impulse
id
public final ContactID iduniquely identifies a contact point between two shapes
Constructor details
ManifoldPoint
public ManifoldPoint()Blank manifold point with everything zeroed out.
ManifoldPoint
public ManifoldPoint(ManifoldPoint cp)Creates a manifold point as a copy of the given point
Parameters
cpManifoldPoint- point to copy from
Method details
set
public void set(ManifoldPoint cp)Sets this manifold point form the given one
Parameters
cpManifoldPoint- the point to copy from