Chipmunk2D Pro API Reference  7.0.3
 All Classes Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Typedefs | Functions
cpDampedRotarySpring

Typedefs

typedef cpFloat(* cpDampedRotarySpringTorqueFunc )(struct cpConstraint *spring, cpFloat relativeAngle)
 Function type used for damped rotary spring force callbacks.
 

Functions

CP_EXPORT cpBool cpConstraintIsDampedRotarySpring (const cpConstraint *constraint)
 Check if a constraint is a damped rotary springs.
 
CP_EXPORT cpDampedRotarySpringcpDampedRotarySpringAlloc (void)
 Allocate a damped rotary spring.
 
CP_EXPORT cpDampedRotarySpringcpDampedRotarySpringInit (cpDampedRotarySpring *joint, cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping)
 Initialize a damped rotary spring.
 
CP_EXPORT cpConstraintcpDampedRotarySpringNew (cpBody *a, cpBody *b, cpFloat restAngle, cpFloat stiffness, cpFloat damping)
 Allocate and initialize a damped rotary spring.
 
CP_EXPORT cpFloat cpDampedRotarySpringGetRestAngle (const cpConstraint *constraint)
 Get the rest length of the spring.
 
CP_EXPORT void cpDampedRotarySpringSetRestAngle (cpConstraint *constraint, cpFloat restAngle)
 Set the rest length of the spring.
 
CP_EXPORT cpFloat cpDampedRotarySpringGetStiffness (const cpConstraint *constraint)
 Get the stiffness of the spring in force/distance.
 
CP_EXPORT void cpDampedRotarySpringSetStiffness (cpConstraint *constraint, cpFloat stiffness)
 Set the stiffness of the spring in force/distance.
 
CP_EXPORT cpFloat cpDampedRotarySpringGetDamping (const cpConstraint *constraint)
 Get the damping of the spring.
 
CP_EXPORT void cpDampedRotarySpringSetDamping (cpConstraint *constraint, cpFloat damping)
 Set the damping of the spring.
 
CP_EXPORT
cpDampedRotarySpringTorqueFunc 
cpDampedRotarySpringGetSpringTorqueFunc (const cpConstraint *constraint)
 Get the damping of the spring.
 
CP_EXPORT void cpDampedRotarySpringSetSpringTorqueFunc (cpConstraint *constraint, cpDampedRotarySpringTorqueFunc springTorqueFunc)
 Set the damping of the spring.
 

Detailed Description