Chipmunk2D Pro API Reference
7.0.1
|
Functions | |
CP_EXPORT cpBool | cpConstraintIsGearJoint (const cpConstraint *constraint) |
Check if a constraint is a damped rotary springs. | |
CP_EXPORT cpGearJoint * | cpGearJointAlloc (void) |
Allocate a gear joint. | |
CP_EXPORT cpGearJoint * | cpGearJointInit (cpGearJoint *joint, cpBody *a, cpBody *b, cpFloat phase, cpFloat ratio) |
Initialize a gear joint. | |
CP_EXPORT cpConstraint * | cpGearJointNew (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. | |