28 #ifndef HPL_PHYSICS_BODY_NEWTON_H 29 #define HPL_PHYSICS_BODY_NEWTON_H 31 #include "hpl1/engine/libraries/newton/Newton.h" 33 #include "hpl1/engine/physics/PhysicsBody.h" 38 void OnTransformUpdate(
iEntity3D *apEntity);
50 void SetLinearVelocity(
const cVector3f &avVel);
52 void SetAngularVelocity(
const cVector3f &avVel);
54 void SetLinearDamping(
float afDamping);
55 float GetLinearDamping()
const;
56 void SetAngularDamping(
float afDamping);
57 float GetAngularDamping()
const;
58 void SetMaxLinearSpeed(
float afSpeed);
59 float GetMaxLinearSpeed()
const;
60 void SetMaxAngularSpeed(
float afDamping);
61 float GetMaxAngularSpeed()
const;
64 void SetMass(
float afMass);
65 float GetMass()
const;
66 void SetMassCentre(
const cVector3f &avCentre);
71 void AddTorque(
const cVector3f &avTorque);
72 void AddImpulse(
const cVector3f &avImpulse);
75 void SetEnabled(
bool abEnabled);
76 bool GetEnabled()
const;
77 void SetAutoDisable(
bool abEnabled);
78 bool GetAutoDisable()
const;
80 void SetAutoDisableLinearThreshold(
float afThresold);
81 float GetAutoDisableLinearThreshold()
const;
82 void SetAutoDisableAngularThreshold(
float afThresold);
83 float GetAutoDisableAngularThreshold()
const;
84 void SetAutoDisableNumSteps(
int alNum);
85 int GetAutoDisableNumSteps()
const;
87 void SetContinuousCollision(
bool abOn);
88 bool GetContinuousCollision();
90 void SetGravity(
bool abEnabled);
91 bool GetGravity()
const;
95 NewtonBody *GetNewtonBody() {
return mpNewtonBody; }
99 void DeleteLowLevel();
101 static void SetUseCallback(
bool abX) { mbUseCallback = abX; }
104 static int BuoyancyPlaneCallback(
const int32 alCollisionID,
void *apContext,
105 const float *afGlobalSpaceMatrix,
float *afGlobalSpacePlane);
106 static void OnTransformCallback(
const NewtonBody *apBody,
const dFloat *apMatrix, int32);
107 static void OnUpdateCallback(NewtonBody *apBody,
float, int32);
109 NewtonBody *mpNewtonBody;
110 NewtonWorld *mpNewtonWorld;
114 static bool mbUseCallback;
119 float mfMaxLinearSpeed;
120 float mfMaxAngularSpeed;
123 float mfAutoDisableLinearThreshold;
124 float mfAutoDisableAngularThreshold;
125 int mlAutoDisableNumSteps;
134 #endif // HPL_PHYSICS_BODY_NEWTON_H
Definition: PhysicsWorld.h:115
Definition: CollideShape.h:50
Definition: PhysicsBody.h:117
Definition: PhysicsMaterial.h:77
Definition: Entity3D.h:81
Definition: PhysicsBodyNewton.h:37
Definition: Entity3D.h:44
Definition: PhysicsBodyNewton.h:41
Definition: LowLevelGraphics.h:200