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

Functions

CP_EXPORT cpBool cpConstraintIsGearJoint (const cpConstraint *constraint)
 Check if a constraint is a damped rotary springs.
 
CP_EXPORT cpGearJointcpGearJointAlloc (void)
 Allocate a gear joint.
 
CP_EXPORT cpGearJointcpGearJointInit (cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio)
 Initialize a gear joint.
 
CP_EXPORT cpConstraintcpGearJointNew (cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio)
 Allocate and initialize a gear joint.
 
CP_EXPORT cpFloat cpGearJointGetPhase (const cpConstraint *constraint)
 Get the phase offset of the gears.
 
CP_EXPORT void cpGearJointSetPhase (cpConstraint *constraint, cpFloat phase)
 Set the phase offset of the gears.
 
CP_EXPORT cpFloat cpGearJointGetRatio (const cpConstraint *constraint)
 Get the angular distance of each ratchet.
 
CP_EXPORT void cpGearJointSetRatio (cpConstraint *constraint, cpFloat ratio)
 Set the ratio of a gear joint.
 

Detailed Description