1 module chipmunk.cpDampedSpring;
2 
3 import chipmunk.chipmunk_types;
4 import chipmunk.chipmunk_structs;
5 import chipmunk.cpConstraint;
6 import chipmunk.cpBB;
7 
8 extern (C):
9 
10 alias double function (cpConstraint*, double) cpDampedSpringForceFunc;
11 
12 cpBool cpConstraintIsDampedSpring (const(cpConstraint)* constraint);
13 cpDampedSpring* cpDampedSpringAlloc ();
14 cpDampedSpring* cpDampedSpringInit (cpDampedSpring* joint, cpBody* a, cpBody* b, cpVect anchorA, cpVect anchorB, cpFloat restLength, cpFloat stiffness, cpFloat damping);
15 cpConstraint* cpDampedSpringNew (cpBody* a, cpBody* b, cpVect anchorA, cpVect anchorB, cpFloat restLength, cpFloat stiffness, cpFloat damping);
16 cpVect cpDampedSpringGetAnchorA (const(cpConstraint)* constraint);
17 void cpDampedSpringSetAnchorA (cpConstraint* constraint, cpVect anchorA);
18 cpVect cpDampedSpringGetAnchorB (const(cpConstraint)* constraint);
19 void cpDampedSpringSetAnchorB (cpConstraint* constraint, cpVect anchorB);
20 cpFloat cpDampedSpringGetRestLength (const(cpConstraint)* constraint);
21 void cpDampedSpringSetRestLength (cpConstraint* constraint, cpFloat restLength);
22 cpFloat cpDampedSpringGetStiffness (const(cpConstraint)* constraint);
23 void cpDampedSpringSetStiffness (cpConstraint* constraint, cpFloat stiffness);
24 cpFloat cpDampedSpringGetDamping (const(cpConstraint)* constraint);
25 void cpDampedSpringSetDamping (cpConstraint* constraint, cpFloat damping);
26 cpDampedSpringForceFunc cpDampedSpringGetSpringForceFunc (const(cpConstraint)* constraint);
27 void cpDampedSpringSetSpringForceFunc (cpConstraint* constraint, cpDampedSpringForceFunc springForceFunc);