diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-19 20:11:47 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-06-19 20:11:47 +0200 |
commit | 9f784e81f81651bed087902f9f3afee113e56148 (patch) | |
tree | ae89f6dabe2443b39aba292673027d197fc120e6 /src/object/auto/autonest.cpp | |
parent | b8027ce9a7f050b95846a668a02f5801331e127f (diff) | |
download | colobot-9f784e81f81651bed087902f9f3afee113e56148.tar.gz colobot-9f784e81f81651bed087902f9f3afee113e56148.tar.bz2 colobot-9f784e81f81651bed087902f9f3afee113e56148.zip |
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
Diffstat (limited to 'src/object/auto/autonest.cpp')
-rw-r--r-- | src/object/auto/autonest.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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;
|