C# Class FarseerPhysics.Dynamics.Joints.FrictionJoint

Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
Inheritance: Joint
Show file Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
localAnchorA Vector2
localAnchorB Vector2
maxForce float
maxTorque float

Public Methods

Method Description
FrictionJoint ( Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates = false ) : FarseerPhysics.Common

Constructor for FrictionJoint.

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

Private Methods

Method Description
FrictionJoint ( ) : FarseerPhysics.Common
initVelocityConstraints ( SolverData &data ) : void
solvePositionConstraints ( SolverData &data ) : bool
solveVelocityConstraints ( SolverData &data ) : void

Method Details

FrictionJoint() public method

Constructor for FrictionJoint.
public FrictionJoint ( Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates = false ) : FarseerPhysics.Common
bodyA Body
bodyB Body
anchor Vector2
useWorldCoordinates bool Set to true if you are using world coordinates as anchors.
return FarseerPhysics.Common

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

localAnchorA public property

The local anchor point on BodyA
public Vector2 localAnchorA
return Vector2

localAnchorB public property

The local anchor point on BodyB
public Vector2 localAnchorB
return Vector2

maxForce public property

The maximum friction force in N.
public float maxForce
return float

maxTorque public property

The maximum friction torque in N-m.
public float maxTorque
return float