Property | Type | Description | |
---|---|---|---|
localAnchorA | Vector2 | ||
localAnchorB | Vector2 | ||
motorImpulse | float | ||
referenceAngle | float |
Method | Description | |
---|---|---|
PrismaticJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, Vector2 axis, bool useWorldCoordinates = false ) : System |
This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
|
|
PrismaticJoint ( Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis, bool useWorldCoordinates = false ) : System | ||
getMotorForce ( float invDt ) : float |
Gets the motor force.
|
|
getReactionForce ( float invDt ) : Vector2 | ||
getReactionTorque ( float invDt ) : float | ||
initialize ( Vector2 localAnchorA, Vector2 localAnchorB, Vector2 axis, bool useWorldCoordinates ) : void | ||
setLimits ( float lower, float upper ) : void |
Set the joint limits, usually in meters.
|
Method | Description | |
---|---|---|
PrismaticJoint ( ) : System | ||
initVelocityConstraints ( SolverData &data ) : void | ||
solvePositionConstraints ( SolverData &data ) : bool | ||
solveVelocityConstraints ( SolverData &data ) : void |
public PrismaticJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, Vector2 axis, bool useWorldCoordinates = false ) : System | ||
bodyA | Body | The first body. |
bodyB | Body | The second body. |
anchorA | Vector2 | The first body anchor. |
anchorB | Vector2 | The second body anchor. |
axis | Vector2 | The axis. |
useWorldCoordinates | bool | Set to true if you are using world coordinates as anchors. |
return | System |
public PrismaticJoint ( Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis, bool useWorldCoordinates = false ) : System | ||
bodyA | Body | |
bodyB | Body | |
anchor | Vector2 | |
axis | Vector2 | |
useWorldCoordinates | bool | |
return | System |
public getMotorForce ( float invDt ) : float | ||
invDt | float | The inverse delta time |
return | float |
public getReactionForce ( float invDt ) : Vector2 | ||
invDt | float | |
return | Vector2 |
public getReactionTorque ( float invDt ) : float | ||
invDt | float | |
return | float |
public initialize ( Vector2 localAnchorA, Vector2 localAnchorB, Vector2 axis, bool useWorldCoordinates ) : void | ||
localAnchorA | Vector2 | |
localAnchorB | Vector2 | |
axis | Vector2 | |
useWorldCoordinates | bool | |
return | void |
public setLimits ( float lower, float upper ) : void | ||
lower | float | The lower limit |
upper | float | The upper limit |
return | void |