HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
|
A prismatic joint allows for translation along a single axis with no rotation. More...
Public Member Functions | |
void | SetLimits (float lower, float upper) |
Sets the prismatic joint limits. | |
![]() | |
void | Destroy () |
Destroys this joint. | |
void | WakeBodies () |
Wakes the bodies connected to this joint. | |
Properties | |
bool | SpringEnabled [get, set] |
Gets or sets the prismatic joint spring enabled state. | |
float | SpringHertz [get, set] |
The spring frequency in Hertz on this prismatic joint. | |
float | SpringDampingRatio [get, set] |
The spring damping ratio on this prismatic joint. | |
bool | LimitEnabled [get, set] |
The limit enabled state of this prismatic joint. | |
float | LowerLimit [get] |
The lower joint limit of this prismatic joint. | |
float | UpperLimit [get] |
The upper joint limit of this prismatic joint. | |
bool | MotorEnabled [get, set] |
The prismatic joint motor enabled state. | |
float | MotorSpeed [get, set] |
The prismatic joint motor speed. | |
float | MaxMotorForce [get, set] |
The prismatic joint maximum motor force. | |
float | MotorForce [get] |
The prismatic joint current motor force. | |
float | Translation [get] |
The current joint translation. | |
float | Speed [get] |
The current joint translation speed. | |
![]() | |
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 prismatic joint allows for translation along a single axis with no rotation.
The prismatic joint is useful for things like pistons and moving platforms, where you want a body to translate along an axis and have no rotation. Also called a slider joint.
void Box2D.PrismaticJoint.SetLimits | ( | float | lower, |
float | upper | ||
) |
Sets the prismatic joint limits.
lower | The lower prismatic joint limit |
upper | The upper prismatic joint limit |
|
getset |
Gets or sets the prismatic joint spring enabled state.