diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-13 22:48:35 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-13 22:48:35 +0200 |
commit | b735913debff93c1a6444ec731cd4bf99ae2a5c2 (patch) | |
tree | efa532d3b4231e5ffd6df8eddcb0ec8cf5d4b28b /src/object/motion/motion.cpp | |
parent | b5d16ef340208bbe1a76f33f7498fb168f6405b6 (diff) | |
download | colobot-b735913debff93c1a6444ec731cd4bf99ae2a5c2.tar.gz colobot-b735913debff93c1a6444ec731cd4bf99ae2a5c2.tar.bz2 colobot-b735913debff93c1a6444ec731cd4bf99ae2a5c2.zip |
FPOINT -> Math::Point & other math functions
- changed FPOINT to Math::Point and some functions
from math module to the new implementation
- moved old function and FPOINT struct declarations to math3d.cpp
- removed some unused functions in math module
- fixed some #include dependencies
- moved #define STRICT and #define D3D_OVERLOADS to compile options
Diffstat (limited to 'src/object/motion/motion.cpp')
-rw-r--r-- | src/object/motion/motion.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/object/motion/motion.cpp b/src/object/motion/motion.cpp index 52609a9..255feb7 100644 --- a/src/object/motion/motion.cpp +++ b/src/object/motion/motion.cpp @@ -16,15 +16,14 @@ // motion.cpp
-#define STRICT
-#define D3D_OVERLOADS
#include <windows.h>
#include <stdio.h>
#include <d3d.h>
-#include "math/all.h"
#include "common/struct.h"
+#include "math/const.h"
+#include "math/geometry.h"
#include "graphics/d3d/d3dengine.h"
#include "math/old/math3d.h"
#include "common/event.h"
@@ -133,21 +132,21 @@ bool CMotion::EventProcess(const Event &event) }
dir = m_object->RetLinVibration();
- dir.x = Smooth(dir.x, m_linVibration.x, time);
- dir.y = Smooth(dir.y, m_linVibration.y, time);
- dir.z = Smooth(dir.z, m_linVibration.z, time);
+ dir.x = Math::Smooth(dir.x, m_linVibration.x, time);
+ dir.y = Math::Smooth(dir.y, m_linVibration.y, time);
+ dir.z = Math::Smooth(dir.z, m_linVibration.z, time);
m_object->SetLinVibration(dir);
dir = m_object->RetCirVibration();
- dir.x = Smooth(dir.x, m_cirVibration.x, time);
- dir.y = Smooth(dir.y, m_cirVibration.y, time);
- dir.z = Smooth(dir.z, m_cirVibration.z, time);
+ dir.x = Math::Smooth(dir.x, m_cirVibration.x, time);
+ dir.y = Math::Smooth(dir.y, m_cirVibration.y, time);
+ dir.z = Math::Smooth(dir.z, m_cirVibration.z, time);
m_object->SetCirVibration(dir);
dir = m_object->RetInclinaison();
- dir.x = Smooth(dir.x, m_inclinaison.x, time);
- dir.y = Smooth(dir.y, m_inclinaison.y, time);
- dir.z = Smooth(dir.z, m_inclinaison.z, time);
+ dir.x = Math::Smooth(dir.x, m_inclinaison.x, time);
+ dir.y = Math::Smooth(dir.y, m_inclinaison.y, time);
+ dir.z = Math::Smooth(dir.z, m_inclinaison.z, time);
m_object->SetInclinaison(dir);
return true;
|