Aether.Physics2D  1.7
FrictionJoint Class Reference

Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction. More...

Inheritance diagram for FrictionJoint:
Collaboration diagram for FrictionJoint:

Public Member Functions

 FrictionJoint (Body bodyA, Body bodyB, Vector2 anchor, bool useWorldCoordinates=false)
 Constructor for FrictionJoint. More...
 
override Vector2 GetReactionForce (float invDt)
 Get the reaction force on body at the joint anchor in Newtons. More...
 
override float GetReactionTorque (float invDt)
 Get the reaction torque on the body at the joint anchor in N*m. More...
 
- Public Member Functions inherited from Joint
bool IsFixedType ()
 Return true if the joint is a fixed type. More...
 

Properties

Vector2 LocalAnchorA [get, set]
 The local anchor point on BodyA More...
 
Vector2 LocalAnchorB [get, set]
 The local anchor point on BodyB More...
 
override Vector2 WorldAnchorA [get, set]
 
override Vector2 WorldAnchorB [get, set]
 
float MaxForce [get, set]
 The maximum friction force in N. More...
 
float MaxTorque [get, set]
 The maximum friction torque in N-m. More...
 
- Properties inherited from Joint
World World [get]
 Get the parent World of this joint. This is null if the joint is not attached. More...
 
JointType JointType [get, protected set]
 Gets or sets the type of the joint. More...
 
Body BodyA [get, set]
 Get the first body attached to this joint. More...
 
Body BodyB [get, set]
 Get the second body attached to this joint. More...
 
abstract Vector2 WorldAnchorA [get, set]
 Get the anchor point on bodyA in world coordinates. On some joints, this value indicate the anchor point within the world. More...
 
abstract Vector2 WorldAnchorB [get, set]
 Get the anchor point on bodyB in world coordinates. On some joints, this value indicate the anchor point within the world. More...
 
bool CollideConnected [get, set]
 Set this flag to true if the attached bodies should collide. More...
 
float Breakpoint [get, set]
 The Breakpoint simply indicates the maximum Value the JointError can be before it breaks. The default value is float.MaxValue, which means it never breaks. More...
 

Additional Inherited Members

- Public Attributes inherited from Joint
bool Enabled = true
 Indicate if this join is enabled or not. Disabling a joint means it is still in the simulation, but inactive. More...
 
object Tag
 Set the user data pointer. More...
 
- Protected Member Functions inherited from Joint
 Joint (Body bodyA, Body bodyB)
 
 Joint (Body body)
 Constructor for fixed joint More...
 
void WakeBodies ()
 
- Events inherited from Joint
Action< Joint, float > Broke
 Fires when the joint is broken. More...
 

Detailed Description

Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.

Constructor & Destructor Documentation

◆ FrictionJoint()

FrictionJoint ( Body  bodyA,
Body  bodyB,
Vector2  anchor,
bool  useWorldCoordinates = false 
)

Constructor for FrictionJoint.

Parameters
bodyA
bodyB
anchor
useWorldCoordinatesSet to true if you are using world coordinates as anchors.

Member Function Documentation

◆ GetReactionForce()

override Vector2 GetReactionForce ( float  invDt)
virtual

Get the reaction force on body at the joint anchor in Newtons.

Parameters
invDtThe inverse delta time.

Implements Joint.

◆ GetReactionTorque()

override float GetReactionTorque ( float  invDt)
virtual

Get the reaction torque on the body at the joint anchor in N*m.

Parameters
invDtThe inverse delta time.

Implements Joint.

Property Documentation

◆ LocalAnchorA

Vector2 LocalAnchorA
getset

The local anchor point on BodyA

◆ LocalAnchorB

Vector2 LocalAnchorB
getset

The local anchor point on BodyB

◆ MaxForce

float MaxForce
getset

The maximum friction force in N.

◆ MaxTorque

float MaxTorque
getset

The maximum friction torque in N-m.


The documentation for this class was generated from the following file: