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
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
dampingRatio float
frequencyHz float
localAnchorA Vector2
localAnchorB Vector2
referenceAngle float

Méthodes publiques

Méthode 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

Méthode Description
WeldJoint ( ) : System
initVelocityConstraints ( SolverData &data ) : void
solvePositionConstraints ( SolverData &data ) : bool
solveVelocityConstraints ( SolverData &data ) : void

Method Details

WeldJoint() public méthode

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.
Résultat System

getReactionForce() public méthode

public getReactionForce ( float invDt ) : Vector2
invDt float
Résultat Vector2

getReactionTorque() public méthode

public getReactionTorque ( float invDt ) : float
invDt float
Résultat 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
Résultat 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
Résultat float

localAnchorA public_oe property

The local anchor point on BodyA
public Vector2 localAnchorA
Résultat Vector2

localAnchorB public_oe property

The local anchor point on BodyB
public Vector2 localAnchorB
Résultat Vector2

referenceAngle public_oe property

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