Chipmunk2D Pro API Reference  7.0.1
 All Classes Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Functions
cpRatchetJoint

Functions

CP_EXPORT cpBool cpConstraintIsRatchetJoint (const cpConstraint *constraint)
 Check if a constraint is a damped rotary springs.
 
CP_EXPORT cpRatchetJointcpRatchetJointAlloc (void)
 Allocate a ratchet joint.
 
CP_EXPORT cpRatchetJointcpRatchetJointInit (cpRatchetJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet)
 Initialize a ratched joint.
 
CP_EXPORT cpConstraintcpRatchetJointNew (cpBody *a, cpBody *b, cpFloat phase, cpFloat ratchet)
 Allocate and initialize a ratchet joint.
 
CP_EXPORT cpFloat cpRatchetJointGetAngle (const cpConstraint *constraint)
 Get the angle of the current ratchet tooth.
 
CP_EXPORT void cpRatchetJointSetAngle (cpConstraint *constraint, cpFloat angle)
 Set the angle of the current ratchet tooth.
 
CP_EXPORT cpFloat cpRatchetJointGetPhase (const cpConstraint *constraint)
 Get the phase offset of the ratchet.
 
CP_EXPORT void cpRatchetJointSetPhase (cpConstraint *constraint, cpFloat phase)
 Get the phase offset of the ratchet.
 
CP_EXPORT cpFloat cpRatchetJointGetRatchet (const cpConstraint *constraint)
 Get the angular distance of each ratchet.
 
CP_EXPORT void cpRatchetJointSetRatchet (cpConstraint *constraint, cpFloat ratchet)
 Set the angular distance of each ratchet.
 

Detailed Description