C# Class Project290.Physics.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: Joint
Afficher le fichier Open project: scastle/Solitude Class Usage Examples

Méthodes publiques

Свойство Type Description
LocalAnchorA Vector2
LocalAnchorB Vector2

Méthodes publiques

Méthode Description
GetReactionForce ( float inv_dt ) : Vector2
GetReactionTorque ( float inv_dt ) : float
WeldJoint ( Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB ) : System

You need to specify a local anchor point where they are attached and the relative body angle. The position of the anchor point is important for computing the reaction torque. You can change the anchor points relative to bodyA or bodyB by changing LocalAnchorA and/or LocalAnchorB.

Private Methods

Méthode Description
InitVelocityConstraints ( TimeStep &step ) : void
SolvePositionConstraints ( ) : bool
SolveVelocityConstraints ( TimeStep &step ) : void

Method Details

GetReactionForce() public méthode

public GetReactionForce ( float inv_dt ) : Vector2
inv_dt float
Résultat Vector2

GetReactionTorque() public méthode

public GetReactionTorque ( float inv_dt ) : float
inv_dt float
Résultat float

WeldJoint() public méthode

You need to specify a local anchor point where they are attached and the relative body angle. The position of the anchor point is important for computing the reaction torque. You can change the anchor points relative to bodyA or bodyB by changing LocalAnchorA and/or LocalAnchorB.
public WeldJoint ( Body bodyA, Body bodyB, Vector2 localAnchorA, Vector2 localAnchorB ) : System
bodyA Body The first body
bodyB Body The second body
localAnchorA Vector2 The first body anchor.
localAnchorB Vector2 The second body anchor.
Résultat System

Property Details

LocalAnchorA public_oe property

public Vector2 LocalAnchorA
Résultat Vector2

LocalAnchorB public_oe property

public Vector2 LocalAnchorB
Résultat Vector2