Class FrictionJoint
- Namespace
- Alis.Core.Physic.Dynamics.Joints
- Assembly
- Alis.dll
Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
public class FrictionJoint : Joint
Inheritance
Inherited Members
Constructors
FrictionJoint()
Initializes a new instance of the Alis.Core.Physic.Dynamics.Joints.FrictionJoint class
internal FrictionJoint()
FrictionJoint(Body, Body, Vector2, bool)
Constructor for FrictionJoint.
public FrictionJoint(Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates = false)
Parameters
bodyA
BodybodyB
Bodyanchor
Vector2useWorldCoordinates
bool-
Set to true if you are using world coordinates as anchors.
Fields
_angularImpulse
The angular impulse
private float _angularImpulse
Field Value
_angularMass
The angular mass
private float _angularMass
Field Value
_indexA
The index
private int _indexA
Field Value
_indexB
The index
private int _indexB
Field Value
_invIA
The inv ia
private float _invIA
Field Value
_invIB
The inv ib
private float _invIB
Field Value
_invMassA
The inv mass
private float _invMassA
Field Value
_invMassB
The inv mass
private float _invMassB
Field Value
_linearImpulse
The linear impulse
private Vector2 _linearImpulse
Field Value
_linearMass
The linear mass
private Mat22 _linearMass
Field Value
_localCenterA
The local center
private Vector2 _localCenterA
Field Value
_localCenterB
The local center
private Vector2 _localCenterB
Field Value
_rA
The
private Vector2 _rA
Field Value
_rB
The
private Vector2 _rB
Field Value
Properties
LocalAnchorA
The local anchor point on BodyA
public Vector2 LocalAnchorA { get; set; }
Property Value
LocalAnchorB
The local anchor point on BodyB
public Vector2 LocalAnchorB { get; set; }
Property Value
MaxForce
The maximum friction force in N.
public float MaxForce { get; set; }
Property Value
MaxTorque
The maximum friction torque in N-m.
public float MaxTorque { get; set; }
Property Value
WorldAnchorA
Gets or sets the value of the world anchor a
public override Vector2 WorldAnchorA { get; set; }
Property Value
WorldAnchorB
Gets or sets the value of the world anchor b
public override Vector2 WorldAnchorB { get; set; }
Property Value
Methods
GetReactionForce(float)
Gets the reaction force using the specified inv dt
public override Vector2 GetReactionForce(float invDt)
Parameters
invDt
float-
The inv dt
Returns
- Vector2
-
The vector
GetReactionTorque(float)
Gets the reaction torque using the specified inv dt
public override float GetReactionTorque(float invDt)
Parameters
invDt
float-
The inv dt
Returns
- float
-
The float
InitVelocityConstraints(ref SolverData)
Inits the velocity constraints using the specified data
internal override void InitVelocityConstraints(ref SolverData data)
Parameters
data
SolverData-
The data
SolvePositionConstraints(ref SolverData)
Describes whether this instance solve position constraints
internal override bool SolvePositionConstraints(ref SolverData data)
Parameters
data
SolverData-
The data
Returns
- bool
-
The bool
SolveVelocityConstraints(ref SolverData)
Solves the velocity constraints using the specified data
internal override void SolveVelocityConstraints(ref SolverData data)
Parameters
data
SolverData-
The data