HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
|
A revolute joint allows for relative rotation in the 2D plane with no relative translation. More...
Public Member Functions | |
void | EnableSpring (bool enableSpring) |
Enables/disables the revolute joint spring. | |
void | SetLimits (float lower, float upper) |
Sets the revolute joint limits in radians. | |
![]() | |
void | Destroy () |
Destroys this joint. | |
void | WakeBodies () |
Wakes the bodies connected to this joint. | |
Properties | |
bool | SpringEnabled [get, set] |
The revolute joint spring enabled state. | |
float | SpringHertz [get, set] |
The revolute joint spring stiffness in Hertz. | |
float | SpringDampingRatio [get, set] |
The revolute joint spring damping ratio. | |
float | Angle [get] |
The current joint angle in radians. | |
bool | LimitEnabled [get, set] |
The revolute joint limit enabled state. | |
float | LowerLimit [get] |
The lower joint limit of this revolute joint in radians. | |
float | UpperLimit [get] |
The upper joint limit of this revolute joint in radians. | |
bool | MotorEnabled [get, set] |
The revolute joint motor enabled state. | |
float | MotorSpeed [get, set] |
The revolute joint motor speed in radians per second. | |
float | MotorTorque [get] |
The revolute joint current motor torque, usually in newton-meters. | |
float | MaxMotorTorque [get, set] |
The revolute joint maximum motor torque, usually in newton-meters. | |
![]() | |
bool | Valid [get] |
Checks if this joint is valid. | |
JointType | Type [get] |
Gets the joint type. | |
Body | BodyA [get] |
Gets body A on this joint. | |
Body | BodyB [get] |
Gets body B on this joint. | |
World | World [get] |
Gets the world that owns this joint. | |
Vec2 | LocalAnchorA [get] |
Gets the local anchor on body A. | |
Vec2 | LocalAnchorB [get] |
Gets the local anchor on body B. | |
bool | CollideConnected [get, set] |
Set this flag to true if the attached bodies should collide. | |
object? | UserData [get, set] |
The user data object for this joint. | |
Vec2 | ConstraintForce [get] |
Gets the current constraint force for this joint. | |
float | ConstraintTorque [get] |
Gets the current constraint torque for this joint. | |
A revolute joint allows for relative rotation in the 2D plane with no relative translation.
The revolute joint is probably the most common joint. It can be used for ragdolls and chains. Also called a hinge or pin joint.
void Box2D.RevoluteJoint.EnableSpring | ( | bool | enableSpring | ) |
Enables/disables the revolute joint spring.
enableSpring | True to enable the spring, false to disable the spring |
void Box2D.RevoluteJoint.SetLimits | ( | float | lower, |
float | upper | ||
) |
Sets the revolute joint limits in radians.
lower | The lower limit in radians |
upper | The upper limit in radians |