C# Class FarseerPhysics.Dynamics.Joints.RevoluteJoint

A revolute joint rains to bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.
Inheritance: Joint
Mostrar archivo Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
localAnchorA Vector2
localAnchorB Vector2

Public Methods

Method Description
RevoluteJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false ) : System

Constructor of RevoluteJoint.

RevoluteJoint ( Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates = false ) : System

Constructor of RevoluteJoint.

getMotorTorque ( float invDt ) : float

Gets the motor torque in N-m.

getReactionForce ( float invDt ) : Vector2
getReactionTorque ( float invDt ) : float
setLimits ( float lower, float upper ) : void

Set the joint limits, usually in meters.

Private Methods

Method Description
RevoluteJoint ( ) : System
initVelocityConstraints ( SolverData &data ) : void
solvePositionConstraints ( SolverData &data ) : bool
solveVelocityConstraints ( SolverData &data ) : void

Method Details

RevoluteJoint() public method

Constructor of RevoluteJoint.
public RevoluteJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false ) : System
bodyA Body The first body.
bodyB Body The second body.
anchorA Vector2 The first body anchor.
anchorB Vector2 The second anchor.
useWorldCoordinates bool Set to true if you are using world coordinates as anchors.
return System

RevoluteJoint() public method

Constructor of RevoluteJoint.
public RevoluteJoint ( Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates = false ) : System
bodyA Body The first body.
bodyB Body The second body.
anchor Vector2 The shared anchor.
useWorldCoordinates bool
return System

getMotorTorque() public method

Gets the motor torque in N-m.
public getMotorTorque ( float invDt ) : float
invDt float The inverse delta time
return float

getReactionForce() public method

public getReactionForce ( float invDt ) : Vector2
invDt float
return Vector2

getReactionTorque() public method

public getReactionTorque ( float invDt ) : float
invDt float
return float

setLimits() public method

Set the joint limits, usually in meters.
public setLimits ( float lower, float upper ) : void
lower float The lower limit
upper float The upper limit
return void

Property Details

localAnchorA public_oe property

The local anchor point on BodyA
public Vector2 localAnchorA
return Vector2

localAnchorB public_oe property

The local anchor point on BodyB
public Vector2 localAnchorB
return Vector2