Contact class abstract
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.
Constructors
Properties
- bodyA → Body
-
no setter
- bodyB → Body
-
no setter
- collision → Collision
-
final
- distance → Distance
-
final
- fixtureA → Fixture
-
final
- fixtureB → Fixture
-
final
- flags ↔ int
-
getter/setter pair
- friction → double
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- indexA → int
-
final
- indexB → int
-
final
- isEnabled ↔ bool
-
Whether this contact is enabled.
getter/setter pair
- manifold → Manifold
-
final
- positionConstraint → ContactPositionConstraint
-
final
- restitution → double
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tangentSpeed ↔ double
-
getter/setter pair
- toi ↔ double
-
getter/setter pair
- toiCount ↔ int
-
getter/setter pair
- velocityConstraint → ContactVelocityConstraint
-
final
Methods
-
containsBody(
Body body) → bool - Whether the body is connected to the joint
-
evaluate(
Manifold manifold, Transform xfA, Transform xfB) → void -
flagForFiltering(
) → void - Flag this contact for filtering. Filtering will occur the next time step.
-
getOtherBody(
Body body) → Body - Get the other body than the argument in the contact
-
getWorldManifold(
WorldManifold worldManifold) → void - Get the world manifold.
-
isTouching(
) → bool - Is this contact touching
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
representsArguments(
Fixture fixtureA, int indexA, Fixture fixtureB, int indexB) → bool -
resetFriction(
) → void -
resetRestitution(
) → void -
toString(
) → String -
A string representation of this object.
inherited
-
update(
ContactListener? listener) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
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 super ball bounces on anything.
Constants
- bulletHitFlag → const int
- enabledFlag → const int
- filterFlag → const int
- islandFlag → const int
- toiFlag → const int
- touchingFlag → const int