C# Class FarseerPhysics.Dynamics.Joints.WeldJoint

A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate.
Inheritance: FarseerPhysics.Dynamics.Joints.FarseerJoint
Datei anzeigen Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
dampingRatio float
frequencyHz float
localAnchorA Vector2
localAnchorB Vector2
referenceAngle float

Public Methods

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

You need to specify an anchor point where they are attached. The position of the anchor point is important for computing the reaction torque.

getReactionForce ( float invDt ) : Vector2
getReactionTorque ( float invDt ) : float

Private Methods

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

Method Details

WeldJoint() public method

You need to specify an anchor point where they are attached. The position of the anchor point is important for computing the reaction torque.
public WeldJoint ( 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 body anchor.
useWorldCoordinates bool Set to true if you are using world coordinates as anchors.
return System

getReactionForce() public method

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

getReactionTorque() public method

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

Property Details

dampingRatio public_oe property

The damping on the joint. The damping is only used when the joint has a frequency (> 0). A higher value means more damping.
public float dampingRatio
return float

frequencyHz public_oe property

The frequency of the joint. A higher frequency means a stiffer joint, but a too high value can cause the joint to oscillate. Default is 0, which means the joint does no spring calculations.
public float frequencyHz
return float

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

referenceAngle public_oe property

The bodyB angle minus bodyA angle in the reference state (radians).
public float referenceAngle
return float