Danbias/Code/Game/DanBiasGame/GameClientState/C_Object.h

48 lines
1.1 KiB
C
Raw Normal View History

#ifndef DANBIAS_CLIENT_COBJECT_H
#define DANBIAS_CLIENT_COBJECT_H
2013-12-09 12:01:36 +01:00
#include "DllInterfaces/GFXAPI.h"
namespace DanBias
{
namespace Client
{
2013-12-09 12:01:36 +01:00
struct ModelInitData
{
2013-12-19 11:58:42 +01:00
int id;
2013-12-09 12:01:36 +01:00
std::wstring modelPath;
Oyster::Math::Float3 position;
Oyster::Math::Quaternion rotation;
Oyster::Math::Float3 scale;
2013-12-09 12:01:36 +01:00
bool visible;
};
class C_Object
{
private:
Oyster::Math::Float4x4 world;
Oyster::Math::Float3 position;
Oyster::Math::Quaternion rotation;
Oyster::Math::Float3 scale;
void updateWorld();
public:
virtual void Init(ModelInitData modelInit);
void setWorld(Oyster::Math::Float4x4 world);
Oyster::Math::Float4x4 getWorld() const;
void setPos(Oyster::Math::Float3 newPos);
Oyster::Math::Float3 getPos() const;
void addPos(Oyster::Math::Float3 deltaPos);
void setRot(Oyster::Math::Quaternion newRot);
Oyster::Math::Quaternion getRotation() const;
void addRot(Oyster::Math::Quaternion deltaRot);
void setScale(Oyster::Math::Float3 newScale);
void addScale(Oyster::Math::Float3 deltaScale);
Oyster::Math::Float3 getScale() const;
virtual void Render() = 0;
virtual void Release() = 0;
2013-12-19 11:58:42 +01:00
virtual int GetId() = 0;
};};};
#endif