Dart Documentationbox2dManifoldPoint

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 Vector2 localPoint;

 /** The non-penetration impulse. */
 double normalImpulse;

 /** The friction impulse. */
 double tangentImpulse;

 /** Unique identifier for a contact point between two shapes. */
 final ContactID id;

 /**
  * Constructs a new ManifoldPoint.
  */
 ManifoldPoint() :
   localPoint = new Vector2.zero(),
   tangentImpulse = 0.0,
   normalImpulse = 0.0,
   id = new ContactID();

 /**
  * Constructs a new ManifoldPoint that is a copy of the given point.
  */
 ManifoldPoint.copy(ManifoldPoint other) :
   localPoint = new Vector2.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 Vector2.zero(),
 tangentImpulse = 0.0,
 normalImpulse = 0.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 Vector2.copy(other.localPoint),
 normalImpulse = other.normalImpulse,
 tangentImpulse = other.tangentImpulse,
 id = new ContactID.copy(other.id) { }

Properties

final ContactID id #

Unique identifier for a contact point between two shapes.

final ContactID id

final Vector2 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 Vector2 localPoint

double normalImpulse #

The non-penetration impulse.

double normalImpulse

double tangentImpulse #

The friction impulse.

double 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);
}