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/autonest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/object/auto/autonest.cpp') diff --git a/src/object/auto/autonest.cpp b/src/object/auto/autonest.cpp index a566444..3644318 100644 --- a/src/object/auto/autonest.cpp +++ b/src/object/auto/autonest.cpp @@ -76,7 +76,7 @@ void CAutoNest::DeleteObject(bool bAll) void CAutoNest::Init() { - D3DVECTOR pos; + Math::Vector pos; m_phase = ANP_WAIT; m_progress = 0.0f; @@ -155,10 +155,10 @@ bool CAutoNest::EventProcess(const Event &event) // Seeks if a site is free. -bool CAutoNest::SearchFree(D3DVECTOR pos) +bool CAutoNest::SearchFree(Math::Vector pos) { CObject* pObj; - D3DVECTOR sPos; + Math::Vector sPos; ObjectType type; float sRadius, distance; int i, j; @@ -174,7 +174,7 @@ bool CAutoNest::SearchFree(D3DVECTOR pos) j = 0; while ( pObj->GetCrashSphere(j++, sPos, sRadius) ) { - distance = Length(sPos, pos); + distance = Math::Distance(sPos, pos); distance -= sRadius; if ( distance < 2.0f ) return false; // location occupied } @@ -185,7 +185,7 @@ bool CAutoNest::SearchFree(D3DVECTOR pos) // Create a transportable object. -void CAutoNest::CreateFret(D3DVECTOR pos, float angle, ObjectType type) +void CAutoNest::CreateFret(Math::Vector pos, float angle, ObjectType type) { CObject* fret; @@ -204,7 +204,7 @@ void CAutoNest::CreateFret(D3DVECTOR pos, float angle, ObjectType type) CObject* CAutoNest::SearchFret() { CObject* pObj; - D3DVECTOR oPos; + Math::Vector oPos; ObjectType type; int i; @@ -242,7 +242,7 @@ Error CAutoNest::RetError() bool CAutoNest::Write(char *line) { - D3DVECTOR pos; + Math::Vector pos; char name[100]; if ( m_phase == ANP_WAIT ) return false; @@ -268,7 +268,7 @@ bool CAutoNest::Write(char *line) bool CAutoNest::Read(char *line) { - D3DVECTOR pos; + Math::Vector pos; if ( OpInt(line, "aExist", 0) == 0 ) return false; -- cgit v1.2.3-1-g7c22