C# Class FarseerPhysics.Dynamics.Joints.LineJoint

Inheritance: Joint
Mostrar archivo Open project: scastle/Solitude Class Usage Examples

Public Methods

Method Description
GetReactionForce ( float inv_dt ) : System.Vector2
GetReactionTorque ( float inv_dt ) : float
LineJoint ( Body bodyA, Body bodyB, System.Vector2 anchorA, System.Vector2 anchorB, System.Vector2 axis ) : System

Initialize the bodies, anchors, axis, and reference angle using the local anchor and world axis. This requires defining a line of motion using an axis and an anchor point. 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 ) : System.Vector2
inv_dt float
return System.Vector2

GetReactionTorque() public method

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

LineJoint() public method

Initialize the bodies, anchors, axis, and reference angle using the local anchor and world axis. This requires defining a line of motion using an axis and an anchor point. 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 LineJoint ( Body bodyA, Body bodyB, System.Vector2 anchorA, System.Vector2 anchorB, System.Vector2 axis ) : System
bodyA Body The first body.
bodyB Body The second body.
anchorA System.Vector2 The first body anchor.
anchorB System.Vector2 The second body anchor.
axis System.Vector2 The axis.
return System