1 module chipmunk.cpArbiter; 2 3 import chipmunk.chipmunk_types; 4 import chipmunk.chipmunk_structs; 5 6 extern (C): 7 8 enum CP_MAX_CONTACTS_PER_ARBITER = 2; 9 10 struct cpContactPointSet 11 { 12 int count; 13 cpVect normal; 14 contactPoint[CP_MAX_CONTACTS_PER_ARBITER] points; 15 16 private struct contactPoint { 17 cpVect pointA, pointB; 18 cpFloat distance; 19 } 20 } 21 22 cpFloat cpArbiterGetRestitution (const(cpArbiter)* arb); 23 void cpArbiterSetRestitution (cpArbiter* arb, cpFloat restitution); 24 cpFloat cpArbiterGetFriction (const(cpArbiter)* arb); 25 void cpArbiterSetFriction (cpArbiter* arb, cpFloat friction); 26 cpVect cpArbiterGetSurfaceVelocity (cpArbiter* arb); 27 void cpArbiterSetSurfaceVelocity (cpArbiter* arb, cpVect vr); 28 cpDataPointer cpArbiterGetUserData (const(cpArbiter)* arb); 29 void cpArbiterSetUserData (cpArbiter* arb, cpDataPointer userData); 30 cpVect cpArbiterTotalImpulse (const(cpArbiter)* arb); 31 cpFloat cpArbiterTotalKE (const(cpArbiter)* arb); 32 cpBool cpArbiterIgnore (cpArbiter* arb); 33 void cpArbiterGetShapes (const(cpArbiter)* arb, cpShape** a, cpShape** b); 34 void cpArbiterGetBodies (const(cpArbiter)* arb, cpBody** a, cpBody** b); 35 cpContactPointSet cpArbiterGetContactPointSet (const(cpArbiter)* arb); 36 void cpArbiterSetContactPointSet (cpArbiter* arb, cpContactPointSet* set); 37 cpBool cpArbiterIsFirstContact (const(cpArbiter)* arb); 38 cpBool cpArbiterIsRemoval (const(cpArbiter)* arb); 39 int cpArbiterGetCount (const(cpArbiter)* arb); 40 cpVect cpArbiterGetNormal (const(cpArbiter)* arb); 41 cpVect cpArbiterGetPointA (const(cpArbiter)* arb, int i); 42 cpVect cpArbiterGetPointB (const(cpArbiter)* arb, int i); 43 cpFloat cpArbiterGetDepth (const(cpArbiter)* arb, int i); 44 cpBool cpArbiterCallWildcardBeginA (cpArbiter* arb, cpSpace* space); 45 cpBool cpArbiterCallWildcardBeginB (cpArbiter* arb, cpSpace* space); 46 cpBool cpArbiterCallWildcardPreSolveA (cpArbiter* arb, cpSpace* space); 47 cpBool cpArbiterCallWildcardPreSolveB (cpArbiter* arb, cpSpace* space); 48 void cpArbiterCallWildcardPostSolveA (cpArbiter* arb, cpSpace* space); 49 void cpArbiterCallWildcardPostSolveB (cpArbiter* arb, cpSpace* space); 50 void cpArbiterCallWildcardSeparateA (cpArbiter* arb, cpSpace* space); 51 void cpArbiterCallWildcardSeparateB (cpArbiter* arb, cpSpace* space);