C# Класс Project290.Physics.Dynamics.Joints.FixedRevoluteJoint

A revolute joint rains to bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.
Наследование: Joint
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
FixedRevoluteJoint ( Body body, Vector2 bodyAnchor, Vector2 worldAnchor ) : System

Initialize the bodies, anchors, and reference angle using the world anchor. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin rather than the center of mass because: 1. you might not know where the center of mass will be. 2. if you add/remove shapes from a body and recompute the mass, the joints will be broken.

GetReactionForce ( float inv_dt ) : Vector2
GetReactionTorque ( float inv_dt ) : float

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

Метод Описание
InitVelocityConstraints ( TimeStep &step ) : void
SolvePositionConstraints ( ) : bool
SolveVelocityConstraints ( TimeStep &step ) : void

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

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

Initialize the bodies, anchors, and reference angle using the world anchor. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin rather than the center of mass because: 1. you might not know where the center of mass will be. 2. if you add/remove shapes from a body and recompute the mass, the joints will be broken.
public FixedRevoluteJoint ( Body body, Vector2 bodyAnchor, Vector2 worldAnchor ) : System
body Body The body.
bodyAnchor Vector2 The body anchor.
worldAnchor Vector2 The world anchor.
Результат System

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

public GetReactionForce ( float inv_dt ) : Vector2
inv_dt float
Результат Vector2

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

public GetReactionTorque ( float inv_dt ) : float
inv_dt float
Результат float