28 #ifndef HPL_PHYSICS_JOINT_NEWTON_H 29 #define HPL_PHYSICS_JOINT_NEWTON_H 31 #include "hpl1/engine/impl/PhysicsBodyNewton.h" 32 #include "hpl1/engine/impl/PhysicsWorldNewton.h" 33 #include "hpl1/engine/libraries/newton/Newton.h" 35 #include "hpl1/engine/system/low_level_system.h" 44 : T(asName, apParentBody, apChildBody, apWorld, avPivotPoint) {
47 mpNewtonWorld = pNWorld->GetNewtonWorld();
52 if (apParentBody == NULL)
53 mpNewtonParentBody = NULL;
55 mpNewtonParentBody = pNParent->GetNewtonBody();
57 mpNewtonChildBody = pNChild->GetNewtonBody();
63 if (this->mpChildBody || this->mpParentBody)
64 NewtonDestroyJoint(mpNewtonWorld, mpNewtonJoint);
69 void SetCollideBodies(
bool abX) {
70 NewtonJointSetCollisionState(mpNewtonJoint, abX ? 1 : 0);
73 bool GetCollideBodies() {
74 return NewtonJointGetCollisionState(mpNewtonJoint) == 0 ? false :
true;
79 void SetStiffness(
float afX) {
80 NewtonJointSetStiffness(mpNewtonJoint, afX);
82 float GetStiffness() {
83 return NewtonJointGetStiffness(mpNewtonJoint);
89 NewtonJoint *mpNewtonJoint;
90 NewtonWorld *mpNewtonWorld;
91 NewtonBody *mpNewtonParentBody;
92 NewtonBody *mpNewtonChildBody;
97 #endif // HPL_PHYSICS_JOINT_NEWTON_H
Definition: PhysicsWorld.h:115
Definition: PhysicsJointNewton.h:40
Definition: PhysicsBody.h:117
Definition: PhysicsWorldNewton.h:36
Definition: PhysicsBodyNewton.h:41