From 9f784e81f81651bed087902f9f3afee113e56148 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Tue, 19 Jun 2012 20:11:47 +0200 Subject: Switched to new implementation of the rest of math module - changed structs from D3DVECTOR to Math::Vector and from D3DMATRIX to Math::Matrix - changed functions to new Math namespace functions - moved mainmovie module from graphics to object - added Get and Set to Math::Matrix --- src/object/auto/autoroot.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/object/auto/autoroot.cpp') diff --git a/src/object/auto/autoroot.cpp b/src/object/auto/autoroot.cpp index 8b16615..df7f0cb 100644 --- a/src/object/auto/autoroot.cpp +++ b/src/object/auto/autoroot.cpp @@ -20,6 +20,7 @@ #include #include "common/struct.h" +#include "math/geometry.h" #include "graphics/d3d/d3dengine.h" #include "math/old/d3dmath.h" #include "common/event.h" @@ -63,19 +64,19 @@ void CAutoRoot::DeleteObject(bool bAll) void CAutoRoot::Init() { - D3DMATRIX* mat; - D3DVECTOR pos, speed; + Math::Matrix* mat; + Math::Vector pos, speed; Math::Point dim; m_time = 0.0f; m_lastParticule = 0.0f; mat = m_object->RetWorldMatrix(0); - pos = D3DVECTOR(-5.0f, 28.0f, -4.0f); // peak position - pos = Transform(*mat, pos); + pos = Math::Vector(-5.0f, 28.0f, -4.0f); // peak position + pos = Math::Transform(*mat, pos); m_center = pos; - speed = D3DVECTOR(0.0f, 0.0f, 0.0f); + speed = Math::Vector(0.0f, 0.0f, 0.0f); dim.x = 100.0f; dim.y = dim.x; m_particule->CreateParticule(m_center, speed, dim, PARTISPHERE5, 0.5f, 0.0f, 0.0f); @@ -88,7 +89,7 @@ void CAutoRoot::Init() bool CAutoRoot::EventProcess(const Event &event) { - D3DVECTOR pos, speed; + Math::Vector pos, speed; Math::Point dim; CAuto::EventProcess(event); -- cgit v1.2.3-1-g7c22