diff options
author | Kent Mein <mein@cs.umn.edu> | 2002-12-03 18:52:47 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2002-12-03 18:52:47 +0300 |
commit | 50ec450e6483aebac88fa26ccad9fb455012c2f0 (patch) | |
tree | 799ac61be1fe3b19d0a99d5afb1e634249bc524e | |
parent | 671a355e9f49ede62794284dd056cb3d6cc77cef (diff) |
Had to make the patch for casting a little more complicated.
m_MotionState->getWorldOrientation((float)worldquat[1],
(float)worldquat[2],(float)worldquat[3],(float)worldquat[0]);
Is now:
#ifdef dDOUBLE
m_MotionState->getWorldOrientation((float)worldquat[1],
(float)worldquat[2],(float)worldquat[3],(float)worldquat[0]);
#else
m_MotionState->getWorldOrientation(worldquat[1],
worldquat[2],worldquat[3],worldquat[0]);
#endif
Kent
--
mein@cs.umn.edu
-rw-r--r-- | source/gameengine/Physics/BlOde/OdePhysicsController.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source/gameengine/Physics/BlOde/OdePhysicsController.cpp b/source/gameengine/Physics/BlOde/OdePhysicsController.cpp index e14f0c9d2f4..0686893f38c 100644 --- a/source/gameengine/Physics/BlOde/OdePhysicsController.cpp +++ b/source/gameengine/Physics/BlOde/OdePhysicsController.cpp @@ -261,8 +261,13 @@ bool ODEPhysicsController::SynchronizeMotionStates(float time) dQuaternion worldquat; float worldpos[3]; +#ifdef dDOUBLE m_MotionState->getWorldOrientation((float)worldquat[1], (float)worldquat[2],(float)worldquat[3],(float)worldquat[0]); +#else + m_MotionState->getWorldOrientation(worldquat[1], + worldquat[2],worldquat[3],worldquat[0]); +#endif m_MotionState->getWorldPosition(worldpos[0],worldpos[1],worldpos[2]); float scaling[3]; @@ -346,8 +351,13 @@ bool ODEPhysicsController::SynchronizeMotionStates(float time) dQuaternion worldquat; float worldpos[3]; +#ifdef dDOUBLE m_MotionState->getWorldOrientation((float)worldquat[1], (float)worldquat[2],(float)worldquat[3],(float)worldquat[0]); +#else + m_MotionState->getWorldOrientation(worldquat[1], + worldquat[2],worldquat[3],worldquat[0]); +#endif m_MotionState->getWorldPosition(worldpos[0],worldpos[1],worldpos[2]); float scaling[3]; @@ -470,7 +480,14 @@ void ODEPhysicsController::SetLinearVelocity(float lin_velX,float lin_velY,float dMatrix3 worldmat; dVector3 localvel; dQuaternion worldquat; - m_MotionState->getWorldOrientation(worldquat[1],worldquat[2],worldquat[3],worldquat[0]); + +#ifdef dDOUBLE + m_MotionState->getWorldOrientation((float)worldquat[1], + (float)worldquat[2], (float)worldquat[3],(float)worldquat[0]); +#else + m_MotionState->getWorldOrientation(worldquat[1],worldquat[2], + worldquat[3],worldquat[0]); +#endif dQtoR (worldquat, worldmat); dMULTIPLY0_331 (localvel,worldmat,vel); |