Danbias/Code/Game/GameLogic/Game_LevelData.cpp

62 lines
1.3 KiB
C++
Raw Normal View History

#include "Game.h"
#include "Level.h"
using namespace GameLogic;
Game::LevelData::LevelData()
{
2014-01-20 15:47:52 +01:00
this->level = new Level();
}
Game::LevelData::~LevelData()
{
2014-01-20 15:47:52 +01:00
delete this->level;
this->level = 0;
}
2014-01-20 15:47:52 +01:00
Oyster::Math::Float3 Game::LevelData::GetPosition()
{
//return this->level->GetCenter();
return Oyster::Math::Float3();
}
Oyster::Math::Quaternion Game::LevelData::GetRotation()
{
return Oyster::Math::Quaternion();
}
Oyster::Math::Float3 Game::LevelData::GetScale()
{
return Oyster::Math::Float3();
}
2014-01-20 15:47:52 +01:00
Oyster::Math::Float4x4 Game::LevelData::GetOrientation()
{
//return this->level->GetOrientation();
return Oyster::Math::Float4x4();
}
2014-01-20 15:47:52 +01:00
int Game::LevelData::GetID() const
{
return ((IObjectData*)this->level)->GetID();
2014-01-20 15:47:52 +01:00
}
2014-02-12 14:48:58 +01:00
ObjectSpecialType Game::LevelData::GetObjectType() const
2014-01-20 15:47:52 +01:00
{
2014-01-30 09:40:58 +01:00
return ((IObjectData*)this->level)->GetObjectType();
//return OBJECT_TYPE_UNKNOWN;
2014-01-20 15:47:52 +01:00
}
int Game::LevelData::getNrOfDynamicObj()const
{
return this->level->getNrOfDynamicObj();
}
IObjectData* Game::LevelData::GetObjectAt(int ID) const
{
return this->level->GetObj(ID);
}
2014-02-18 11:44:02 +01:00
void Game::LevelData::GetAllDynamicObjects(Utility::DynamicMemory::DynamicArray<IObjectData*>& mem) const
{
mem.Resize(level->dynamicObjects.Size());
2014-02-18 13:47:40 +01:00
for(int i = 0; i < (int)level->dynamicObjects.Size(); i++)
{
2014-02-18 11:44:02 +01:00
mem[i] = level->dynamicObjects[i];
}
}