46 joint =
new (mem)
b2DistanceJoint(static_cast<const b2DistanceJointDef*>(def));
53 joint =
new (mem)
b2MouseJoint(static_cast<const b2MouseJointDef*>(def));
60 joint =
new (mem)
b2PrismaticJoint(static_cast<const b2PrismaticJointDef*>(def));
67 joint =
new (mem)
b2RevoluteJoint(static_cast<const b2RevoluteJointDef*>(def));
74 joint =
new (mem)
b2PulleyJoint(static_cast<const b2PulleyJointDef*>(def));
81 joint =
new (mem)
b2GearJoint(static_cast<const b2GearJointDef*>(def));
88 joint =
new (mem)
b2WheelJoint(static_cast<const b2WheelJointDef*>(def));
95 joint =
new (mem)
b2WeldJoint(static_cast<const b2WeldJointDef*>(def));
102 joint =
new (mem)
b2FrictionJoint(static_cast<const b2FrictionJointDef*>(def));
109 joint =
new (mem)
b2RopeJoint(static_cast<const b2RopeJointDef*>(def));
116 joint =
new (mem)
b2MotorJoint(static_cast<const b2MotorJointDef*>(def));
static void Destroy(b2Joint *joint, b2BlockAllocator *allocator)
Joint definitions are used to construct joints.
b2JointEdge * prev
the previous joint edge in the body's joint list
void Free(void *p, int32 size)
Free memory. This will use b2Free if the size is larger than b2_maxBlockSize.
b2Body * other
provides quick access to the other body attached.
void * Allocate(int32 size)
Allocate memory. This will use b2Alloc if the size is larger than b2_maxBlockSize.
bool collideConnected
Set this flag to true if the attached bodies should collide.
void * userData
Use this to attach application specific data to your joints.
bool IsActive() const
Get the active state of the body.
b2Joint(const b2JointDef *def)
b2JointType type
The joint type is set automatically for concrete joint types.
bool IsActive() const
Short-cut function to determine if either body is inactive.
b2Body * bodyA
The first attached body.
static b2Joint * Create(const b2JointDef *def, b2BlockAllocator *allocator)
b2Body * bodyB
The second attached body.
b2JointEdge * next
the next joint edge in the body's joint list