C# Class FarseerPhysics.Dynamics.Contacts.Contact

The public 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: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
enabled bool
fixtureA Fixture
fixtureB Fixture
friction float
manifold FarseerPhysics.Collision.Manifold
restitution float
tangentSpeed float

Public Methods

Method Description
Contact ( Fixture fA, int indexA, Fixture fB, int indexB ) : System.Collections.Generic
evaluate ( Manifold &manifold, Transform &transformA, Transform &transformB ) : void

Evaluate this contact with your own manifold and transforms.

getWorldManifold ( System.Vector2 &normal, FixedArray2 &points ) : void

Gets the world manifold.

reset ( Fixture fA, int indexA, Fixture fB, int indexB ) : void
resetFriction ( ) : void
resetRestitution ( ) : void

Private Methods

Method Description
create ( Fixture fixtureA, int indexA, Fixture fixtureB, int indexB ) : Contact
destroy ( ) : void
update ( ContactManager contactManager ) : void

Update the contact manifold and touching status. Note: do not assume the fixture AABBs are overlapping or are valid.

Method Details

Contact() public method

public Contact ( Fixture fA, int indexA, Fixture fB, int indexB ) : System.Collections.Generic
fA Fixture
indexA int
fB Fixture
indexB int
return System.Collections.Generic

evaluate() public method

Evaluate this contact with your own manifold and transforms.
public evaluate ( Manifold &manifold, Transform &transformA, Transform &transformB ) : void
manifold FarseerPhysics.Collision.Manifold The manifold.
transformA Transform The first transform.
transformB Transform The second transform.
return void

getWorldManifold() public method

Gets the world manifold.
public getWorldManifold ( System.Vector2 &normal, FixedArray2 &points ) : void
normal System.Vector2
points FixedArray2
return void

reset() public method

public reset ( Fixture fA, int indexA, Fixture fB, int indexB ) : void
fA Fixture
indexA int
fB Fixture
indexB int
return void

resetFriction() public method

public resetFriction ( ) : void
return void

resetRestitution() public method

public resetRestitution ( ) : void
return void

Property Details

enabled public property

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). NOTE: If you are setting Enabled to a constant true or false, use the explicit Enable() or Disable() functions instead to save the CPU from doing a branch operation.
public bool enabled
return bool

fixtureA public property

public Fixture fixtureA
return Fixture

fixtureB public property

public Fixture fixtureB
return Fixture

friction public property

public float friction
return float

manifold public property

Get the contact manifold. Do not modify the manifold unless you understand the internals of Box2D.
public Manifold,FarseerPhysics.Collision manifold
return FarseerPhysics.Collision.Manifold

restitution public property

public float restitution
return float

tangentSpeed public property

public float tangentSpeed
return float