HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.1
|
A revolute joint allows for relative rotation in the 2D plane with no relative translation. More...
Public Member Functions | |
unsafe void | EnableSpring (bool enableSpring) |
Enables/disables the revolute joint spring. | |
unsafe void | SetLimits (float lower, float upper) |
Sets the revolute joint limits in radians. | |
![]() | |
unsafe void | Destroy () |
Destroys this joint. | |
unsafe void | WakeBodies () |
Wakes the bodies connected to this joint. | |
unsafe (float hertz, float dampingRatio) ConstraintTuning | |
Gets or sets the joint constraint tuning in Hertz and damping ratio. Advanced feature. | |
Properties | |
unsafe bool | SpringEnabled [get, set] |
The revolute joint spring enabled state. | |
unsafe float | SpringHertz [get, set] |
The revolute joint spring stiffness in Hertz. | |
unsafe float | SpringDampingRatio [get, set] |
The revolute joint spring damping ratio. | |
unsafe float | TargetAngle [get, set] |
The revolute joint spring target angle in radians. | |
unsafe float | Angle [get] |
The current joint angle in radians. | |
unsafe bool | LimitEnabled [get, set] |
The revolute joint limit enabled state. | |
unsafe float | LowerLimit [get] |
The lower joint limit of this revolute joint in radians. | |
unsafe float | UpperLimit [get] |
The upper joint limit of this revolute joint in radians. | |
unsafe bool | MotorEnabled [get, set] |
The revolute joint motor enabled state. | |
unsafe float | MotorSpeed [get, set] |
The revolute joint motor speed in radians per second. | |
unsafe float | MotorTorque [get] |
The revolute joint current motor torque, usually in newton-meters. | |
unsafe float | MaxMotorTorque [get, set] |
The revolute joint maximum motor torque, usually in newton-meters. | |
![]() | |
unsafe bool | Valid [get] |
Checks if this joint is valid. | |
unsafe JointType | Type [get] |
Gets the joint type. | |
unsafe Body | BodyA [get] |
Gets body A on this joint. | |
unsafe Body | BodyB [get] |
Gets body B on this joint. | |
unsafe World | World [get] |
Gets the world that owns this joint. | |
unsafe Vec2 | LocalAnchorA [get, set] |
The local anchor on body A. | |
unsafe Vec2 | LocalAnchorB [get, set] |
The local anchor on body B. | |
unsafe bool | CollideConnected [get, set] |
Set this flag to true if the attached bodies should collide. | |
unsafe? object | UserData [get, set] |
The user data object for this joint. | |
unsafe Vec2 | ConstraintForce [get] |
Gets the current constraint force for this joint. | |
unsafe float | ConstraintTorque [get] |
Gets the current constraint torque for this joint. | |
unsafe float | LinearSeparation [get] |
Gets the current linear separation error for this joint. | |
unsafe float | AngularSeparation [get] |
Gets the current angular separation error for this joint. | |
unsafe float | ReferenceAngle [get, set] |
The reference angle in radians for joints that support it. | |
unsafe Vec2 | LocalAxisA [get, set] |
The local axis on body A for joints that support it. | |
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.
unsafe void Box2D.RevoluteJoint.EnableSpring | ( | bool | enableSpring | ) |
Enables/disables the revolute joint spring.
enableSpring | True to enable the spring, false to disable the spring |
unsafe 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 |
It is expected that lower <= upper and that -0.99 * System.Math.PI <= lower && upper <= -0.99 * System.Math.PI.