Contact class

The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if filtered). Therefore a contact object may exist that has no contact points.

Implementers

Constructors

Contact(IWorldPool _pool)

Properties

fixtureA Fixture
Get the first fixture in this contact. [...]
read-only
fixtureB Fixture
Get the second fixture in this contact. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

evaluate(Manifold manifold, Transform xfA, Transform xfB) → void
flagForFiltering() → void
Flag this contact for filtering. Filtering will occur the next time step.
getChildIndexA() int
getChildIndexB() int
getNext() Contact
Get the next contact in the world's contact list. [...]
getWorldManifold(WorldManifold worldManifold) → void
Get the world manifold.
init(Fixture fA, int indexA, Fixture fB, int indexB) → void
initialization for pooling
isEnabled() bool
Has this contact been disabled? [...]
isTouching() bool
Is this contact touching [...]
resetFriction() → void
resetRestitution() → void
setEnabled(bool flag) → void
Enable/disable this contact. This can be used inside the pre-solve contact listener. The contact is only disabled for the current time step (or sub-step in continuous collisions). [...]
update(ContactListener listener) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Properties

BULLET_HIT_FLAG int
final
ENABLED_FLAG int
final
FILTER_FLAG int
final
ISLAND_FLAG int
final
TOI_FLAG int
final
TOUCHING_FLAG int
final

Static Methods

mixFriction(double friction1, double friction2) double
Friction mixing law. The idea is to allow either fixture to drive the restitution to zero. For example, anything slides on ice. [...]
mixRestitution(double restitution1, double restitution2) double
Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. For example, a superball bounces on anything. [...]