C# Class Jitter.Dynamics.Contact

Inheritance: IConstraint
Exibir arquivo Open project: tpb3d/TPB3D Class Usage Examples

Public Properties

Property Type Description
Pool ResourcePool

Public Methods

Method Description
ApplyImpulse ( Jitter.LinearMath.JVector &impulse ) : void

An impulse is applied an both contact points.

CalculateRelativeVelocity ( ) : Jitter.LinearMath.JVector

Calculates relative velocity of body contact points on the bodies.

Initialize ( RigidBody body1, RigidBody body2, Jitter.LinearMath.JVector &point1, Jitter.LinearMath.JVector &point2, Jitter.LinearMath.JVector &n, float penetration, bool newContact, ContactSettings settings ) : void

Initializes a contact.

Iterate ( ) : void

Solves the contact iteratively.

PrepareForIteration ( float timestep ) : void

PrepareForIteration has to be called before Iterate.

UpdatePosition ( ) : void

The points in wolrd space gets recalculated by transforming the local coordinates. Also new penetration depth is estimated.

Method Details

ApplyImpulse() public method

An impulse is applied an both contact points.
public ApplyImpulse ( Jitter.LinearMath.JVector &impulse ) : void
impulse Jitter.LinearMath.JVector The impulse to apply.
return void

CalculateRelativeVelocity() public method

Calculates relative velocity of body contact points on the bodies.
public CalculateRelativeVelocity ( ) : Jitter.LinearMath.JVector
return Jitter.LinearMath.JVector

Initialize() public method

Initializes a contact.
public Initialize ( RigidBody body1, RigidBody body2, Jitter.LinearMath.JVector &point1, Jitter.LinearMath.JVector &point2, Jitter.LinearMath.JVector &n, float penetration, bool newContact, ContactSettings settings ) : void
body1 RigidBody The first body.
body2 RigidBody The second body.
point1 Jitter.LinearMath.JVector The collision point in worldspace
point2 Jitter.LinearMath.JVector The collision point in worldspace
n Jitter.LinearMath.JVector The normal pointing to body2.
penetration float The estimated penetration depth.
newContact bool
settings ContactSettings
return void

Iterate() public method

Solves the contact iteratively.
public Iterate ( ) : void
return void

PrepareForIteration() public method

PrepareForIteration has to be called before Iterate.
public PrepareForIteration ( float timestep ) : void
timestep float The timestep of the simulation.
return void

UpdatePosition() public method

The points in wolrd space gets recalculated by transforming the local coordinates. Also new penetration depth is estimated.
public UpdatePosition ( ) : void
return void

Property Details

Pool public_oe static_oe property

A contact resource pool.
public static ResourcePool Pool
return ResourcePool