C# Class Project290.Physics.Dynamics.Joints.PrismaticJoint

A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in body1. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
Inheritance: Joint
ファイルを表示 Open project: scastle/Solitude Class Usage Examples

Public Properties

Property Type Description
LocalAnchorA Vector2
LocalAnchorB Vector2

Public Methods

Method Description
GetReactionForce ( float inv_dt ) : Vector2
GetReactionTorque ( float inv_dt ) : float
PrismaticJoint ( Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB, Vector2 axis ) : 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.

Private Methods

Method Description
InitVelocityConstraints ( TimeStep &step ) : void
SolvePositionConstraints ( ) : bool
SolveVelocityConstraints ( TimeStep &step ) : void

Method Details

GetReactionForce() public method

public GetReactionForce ( float inv_dt ) : Vector2
inv_dt float
return Vector2

GetReactionTorque() public method

public GetReactionTorque ( float inv_dt ) : float
inv_dt float
return float

PrismaticJoint() public method

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.
public PrismaticJoint ( Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB, Vector2 axis ) : System
bodyA Body The first body.
bodyB Body The second body.
localAnchorA Vector2 The first body anchor.
localAnchorB Vector2 The second body anchor.
axis Vector2 The axis.
return System

Property Details

LocalAnchorA public_oe property

public Vector2 LocalAnchorA
return Vector2

LocalAnchorB public_oe property

public Vector2 LocalAnchorB
return Vector2