Class b2Joint
A constraint between two bodies, solved with the contacts in each island. Created by b2World; destroying either body destroys it.
public abstract class b2Joint
- Inheritance
-
b2Joint
- Derived
- Inherited Members
- Extension Methods
Remarks
Reference: Box2D/Dynamics/Joints/b2Joint.cpp.
Constructors
b2Joint(b2JointDef)
A joint from a definition.
protected b2Joint(b2JointDef def)
Parameters
defb2JointDefThe definition.
Exceptions
- AssertionError
Thrown when both bodies are the same.
Properties
Active
Whether both bodies are active (pybox2d's active).
public bool Active { get; }
Property Value
AnchorA
The anchor on body A in world coordinates (pybox2d's anchorA).
public b2Vec2 AnchorA { get; }
Property Value
AnchorB
The anchor on body B in world coordinates (pybox2d's anchorB).
public b2Vec2 AnchorB { get; }
Property Value
BodyA
Body A (pybox2d's bodyA).
public b2Body BodyA { get; }
Property Value
BodyB
Body B (pybox2d's bodyB).
public b2Body BodyB { get; }
Property Value
CollideConnected
Whether the bodies may collide (pybox2d's collideConnected).
public bool CollideConnected { get; }
Property Value
Type
The joint type (pybox2d's type).
public b2JointType Type { get; }
Property Value
UserData
The user data.
public object? UserData { get; set; }