Joint
Declaration
public abstract class tainicom.Aether.Physics2D.Dynamics.Joints.Joint
Constructors
Joint protected
void Joint()
Joint protected
void Joint(Body bodyA, Body bodyB)
Parameters:
| Name | Type | Description |
|---|---|---|
bodyA |
tainicom.Aether.Physics2D.Dynamics.Body |
|
bodyB |
tainicom.Aether.Physics2D.Dynamics.Body |
Joint protected
Constructor for fixed joint
void Joint(Body body)
Parameters:
| Name | Type | Description |
|---|---|---|
body |
tainicom.Aether.Physics2D.Dynamics.Body |
Properties
World
Get the parent World of this joint. This is null if the joint is not attached.
World World { get }
JointType
Gets or sets the type of the joint.
JointType JointType { get set }
Value: The type of the joint.
BodyA
Get the first body attached to this joint.
Body BodyA { get }
BodyB
Get the second body attached to this joint.
Body BodyB { get }
WorldAnchorA abstract
Get the anchor point on bodyA in world coordinates. On some joints, this value indicate the anchor point within the world.
Vector2 WorldAnchorA { get set }
WorldAnchorB abstract
Get the anchor point on bodyB in world coordinates. On some joints, this value indicate the anchor point within the world.
Vector2 WorldAnchorB { get set }
CollideConnected
Set this flag to true if the attached bodies should collide.
bool CollideConnected { get set }
Breakpoint
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.
float Breakpoint { get set }
Fields
Enabled
Indicate if this join is enabled or not. Disabling a joint means it is still in the simulation, but inactive.
bool Enabled
Tag
Set the user data pointer.
object Tag
Value: The data.
Methods
GetReactionForce abstract
Get the reaction force on body at the joint anchor in Newtons.
Vector2 GetReactionForce(float invDt)
Parameters:
| Name | Type | Description |
|---|---|---|
invDt |
System.Single |
The inverse delta time. |
GetReactionTorque abstract
Get the reaction torque on the body at the joint anchor in N*m.
float GetReactionTorque(float invDt)
Parameters:
| Name | Type | Description |
|---|---|---|
invDt |
System.Single |
The inverse delta time. |
WakeBodies protected
void WakeBodies()
IsFixedType
Return true if the joint is a fixed type.
bool IsFixedType()
Events
Broke
Fires when the joint is broken.
event Action<Joint, float> Broke