C# Класс BEPUphysics.Constraints.TwoEntity.JointLimits.TwistLimit

Prevents the connected entities from twisting relative to each other beyond given limits.
Наследование: JointLimit, I1DImpulseConstraintWithError, I1DJacobianConstraint
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
maximumAngle float
minimumAngle float

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

Метод Описание
ExclusiveUpdate ( ) : void

Performs any pre-solve iteration work that needs exclusive access to the members of the solver updateable. Usually, this is used for applying warmstarting impulses.

GetAngularJacobianA ( Vector3 &jacobian ) : void

Gets the angular jacobian entry for the first connected entity.

GetAngularJacobianB ( Vector3 &jacobian ) : void

Gets the angular jacobian entry for the second connected entity.

GetLinearJacobianA ( Vector3 &jacobian ) : void

Gets the linear jacobian entry for the first connected entity.

GetLinearJacobianB ( Vector3 &jacobian ) : void

Gets the linear jacobian entry for the second connected entity.

GetMassMatrix ( float &outputMassMatrix ) : void

Gets the mass matrix of the constraint.

SetupJointTransforms ( Vector3 worldTwistAxisA, Vector3 worldTwistAxisB ) : void

Sets up the joint transforms by automatically creating perpendicular vectors to complete the bases.

SolveIteration ( ) : float

Solves for velocity.

TwistLimit ( ) : System

Constructs a new constraint which prevents the connected entities from twisting relative to each other beyond given limits. To finish the initialization, specify the connections (ConnectionA and ConnectionB) as well as the BasisA, BasisB and the MinimumAngle and MaximumAngle. This constructor sets the constraint's IsActive property to false by default.

TwistLimit ( Entity connectionA, Entity connectionB, Vector3 axisA, Vector3 axisB, float minimumAngle, float maximumAngle ) : System

Constructs a new constraint which prevents the connected entities from twisting relative to each other beyond given limits.

Update ( float dt ) : void

Do any necessary computations to prepare the constraint for this frame.

Приватные методы

Метод Описание
ComputeAngleError ( float distanceFromCurrent, float distanceFromMaximum ) : float
GetDistanceFromMinimum ( float angle ) : float
IsAngleValid ( float currentAngle, float &distanceFromCurrent, float &distanceFromMaximum ) : bool

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

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

Performs any pre-solve iteration work that needs exclusive access to the members of the solver updateable. Usually, this is used for applying warmstarting impulses.
public ExclusiveUpdate ( ) : void
Результат void

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

Gets the angular jacobian entry for the first connected entity.
public GetAngularJacobianA ( Vector3 &jacobian ) : void
jacobian Vector3 Angular jacobian entry for the first connected entity.
Результат void

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

Gets the angular jacobian entry for the second connected entity.
public GetAngularJacobianB ( Vector3 &jacobian ) : void
jacobian Vector3 Angular jacobian entry for the second connected entity.
Результат void

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

Gets the linear jacobian entry for the first connected entity.
public GetLinearJacobianA ( Vector3 &jacobian ) : void
jacobian Vector3 Linear jacobian entry for the first connected entity.
Результат void

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

Gets the linear jacobian entry for the second connected entity.
public GetLinearJacobianB ( Vector3 &jacobian ) : void
jacobian Vector3 Linear jacobian entry for the second connected entity.
Результат void

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

Gets the mass matrix of the constraint.
public GetMassMatrix ( float &outputMassMatrix ) : void
outputMassMatrix float Constraint's mass matrix.
Результат void

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

Sets up the joint transforms by automatically creating perpendicular vectors to complete the bases.
public SetupJointTransforms ( Vector3 worldTwistAxisA, Vector3 worldTwistAxisB ) : void
worldTwistAxisA Vector3 Twist axis in world space to attach to entity A.
worldTwistAxisB Vector3 Twist axis in world space to attach to entity B.
Результат void

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

Solves for velocity.
public SolveIteration ( ) : float
Результат float

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

Constructs a new constraint which prevents the connected entities from twisting relative to each other beyond given limits. To finish the initialization, specify the connections (ConnectionA and ConnectionB) as well as the BasisA, BasisB and the MinimumAngle and MaximumAngle. This constructor sets the constraint's IsActive property to false by default.
public TwistLimit ( ) : System
Результат System

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

Constructs a new constraint which prevents the connected entities from twisting relative to each other beyond given limits.
public TwistLimit ( Entity connectionA, Entity connectionB, Vector3 axisA, Vector3 axisB, float minimumAngle, float maximumAngle ) : System
connectionA Entity First connection of the pair.
connectionB Entity Second connection of the pair.
axisA Vector3 Twist axis attached to the first connected entity.
axisB Vector3 Twist axis attached to the second connected entity.
minimumAngle float Minimum twist angle allowed.
maximumAngle float Maximum twist angle allowed.
Результат System

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

Do any necessary computations to prepare the constraint for this frame.
public Update ( float dt ) : void
dt float Simulation step length.
Результат void

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

maximumAngle защищенное свойство

Naximum angle that entities can twist.
protected float maximumAngle
Результат float

minimumAngle защищенное свойство

Minimum angle that entities can twist.
protected float minimumAngle
Результат float