ManifoldPoint class
class ManifoldPoint { /** * Usage depends on manifold type. For circles, is the local center of * circleB. For faceA, is the local center of CircleB or the clip point of * polygonB. For faceB, is the clip point of polygonA. */ final Vector localPoint; /** The non-penetration impulse. */ num normalImpulse; /** The friction impulse. */ num tangentImpulse; /** Unique identifier for a contact point between two shapes. */ final ContactID id; /** * Constructs a new ManifoldPoint. */ ManifoldPoint() : localPoint = new Vector(), tangentImpulse = 0, normalImpulse = 0, id = new ContactID() { } /** * Constructs a new ManifoldPoint that is a copy of the given point. */ ManifoldPoint.copy(ManifoldPoint other) : localPoint = new Vector.copy(other.localPoint), normalImpulse = other.normalImpulse, tangentImpulse = other.tangentImpulse, id = new ContactID.copy(other.id) { } /** * Sets this ManifoldPoint to be equal to the given point. */ void setFrom(ManifoldPoint other) { localPoint.setFrom(other.localPoint); normalImpulse = other.normalImpulse; tangentImpulse = other.tangentImpulse; id.setFrom(other.id); } }
Constructors
new ManifoldPoint() #
Constructs a new ManifoldPoint.
ManifoldPoint() : localPoint = new Vector(), tangentImpulse = 0, normalImpulse = 0, id = new ContactID() { }
new ManifoldPoint.copy(ManifoldPoint other) #
Constructs a new ManifoldPoint that is a copy of the given point.
ManifoldPoint.copy(ManifoldPoint other) : localPoint = new Vector.copy(other.localPoint), normalImpulse = other.normalImpulse, tangentImpulse = other.tangentImpulse, id = new ContactID.copy(other.id) { }
Properties
final Vector localPoint #
Usage depends on manifold type. For circles, is the local center of circleB. For faceA, is the local center of CircleB or the clip point of polygonB. For faceB, is the clip point of polygonA.
final Vector localPoint;
num normalImpulse #
The non-penetration impulse.
num normalImpulse;
num tangentImpulse #
The friction impulse.
num tangentImpulse;
Methods
void setFrom(ManifoldPoint other) #
Sets this ManifoldPoint to be equal to the given point.
void setFrom(ManifoldPoint other) { localPoint.setFrom(other.localPoint); normalImpulse = other.normalImpulse; tangentImpulse = other.tangentImpulse; id.setFrom(other.id); }