C# Класс Jitter.Dynamics.Contact

Наследование: IConstraint
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Pool ResourcePool

Открытые методы

Метод Описание
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.

Описание методов

ApplyImpulse() публичный Метод

An impulse is applied an both contact points.
public ApplyImpulse ( Jitter.LinearMath.JVector &impulse ) : void
impulse Jitter.LinearMath.JVector The impulse to apply.
Результат void

CalculateRelativeVelocity() публичный Метод

Calculates relative velocity of body contact points on the bodies.
public CalculateRelativeVelocity ( ) : Jitter.LinearMath.JVector
Результат Jitter.LinearMath.JVector

Initialize() публичный Метод

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
Результат void

Iterate() публичный Метод

Solves the contact iteratively.
public Iterate ( ) : void
Результат void

PrepareForIteration() публичный Метод

PrepareForIteration has to be called before Iterate.
public PrepareForIteration ( float timestep ) : void
timestep float The timestep of the simulation.
Результат void

UpdatePosition() публичный Метод

The points in wolrd space gets recalculated by transforming the local coordinates. Also new penetration depth is estimated.
public UpdatePosition ( ) : void
Результат void

Описание свойств

Pool публичное статическое свойство

A contact resource pool.
public static ResourcePool Pool
Результат ResourcePool