Chipmunk2D Pro API Reference  7.0.0
 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

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

Detailed Description