C# Class Box2D.Dynamics.Contacts.Contact

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.
Show file Open project: gerich-home/box2dnet Class Usage Examples

Public Properties

Property Type Description
Flags ContactFlags
NodeA ContactEdge
NodeB ContactEdge
Prev Contact
Toi float
ToiCount float

Protected Properties

Property Type Description
Pool IWorldPool

Public Methods

Method Description
Evaluate ( Manifold manifold, Transform xfA, Transform xfB ) : void
GetWorldManifold ( WorldManifold worldManifold ) : void

Get the world manifold.

Init ( Fixture fA, int indexA, Fixture fB, int indexB ) : void

initialization for pooling

MixFriction ( float friction1, float friction2 ) : float

Friction mixing law. The idea is to allow either fixture to drive the restitution to zero. For example, anything slides on ice.

MixRestitution ( float restitution1, float restitution2 ) : float

Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. For example, a superball bounces on anything.

ResetFriction ( ) : void
ResetRestitution ( ) : void
SetFlagForFiltering ( ) : void

Flag this contact for filtering. Filtering will occur the next time step.

Update ( IContactListener listener ) : void

Protected Methods

Method Description
Contact ( IWorldPool argPool ) : System

Method Details

Contact() protected method

protected Contact ( IWorldPool argPool ) : System
argPool IWorldPool
return System

Evaluate() public abstract method

public abstract Evaluate ( Manifold manifold, Transform xfA, Transform xfB ) : void
manifold Box2D.Collision.Manifold
xfA Box2D.Common.Transform
xfB Box2D.Common.Transform
return void

GetWorldManifold() public method

Get the world manifold.
public GetWorldManifold ( WorldManifold worldManifold ) : void
worldManifold Box2D.Collision.WorldManifold
return void

Init() public method

initialization for pooling
public Init ( Fixture fA, int indexA, Fixture fB, int indexB ) : void
fA Fixture
indexA int
fB Fixture
indexB int
return void

MixFriction() public static method

Friction mixing law. The idea is to allow either fixture to drive the restitution to zero. For example, anything slides on ice.
public static MixFriction ( float friction1, float friction2 ) : float
friction1 float
friction2 float
return float

MixRestitution() public static method

Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. For example, a superball bounces on anything.
public static MixRestitution ( float restitution1, float restitution2 ) : float
restitution1 float
restitution2 float
return float

ResetFriction() public method

public ResetFriction ( ) : void
return void

ResetRestitution() public method

public ResetRestitution ( ) : void
return void

SetFlagForFiltering() public method

Flag this contact for filtering. Filtering will occur the next time step.
public SetFlagForFiltering ( ) : void
return void

Update() public method

public Update ( IContactListener listener ) : void
listener IContactListener
return void

Property Details

Flags public property

public ContactFlags Flags
return ContactFlags

NodeA public property

public ContactEdge,Box2D.Dynamics.Contacts NodeA
return ContactEdge

NodeB public property

public ContactEdge,Box2D.Dynamics.Contacts NodeB
return ContactEdge

Pool protected property

protected IWorldPool Pool
return IWorldPool

Prev public property

public Contact,Box2D.Dynamics.Contacts Prev
return Contact

Toi public property

public float Toi
return float

ToiCount public property

public float ToiCount
return float