2013-12-16 09:45:12 +01:00
|
|
|
#include "C_Player.h"
|
|
|
|
#include "DllInterfaces/GFXAPI.h"
|
|
|
|
using namespace DanBias::Client;
|
|
|
|
|
|
|
|
struct C_Player::myData
|
|
|
|
{
|
|
|
|
myData(){}
|
|
|
|
Oyster::Math3D::Float4x4 view;
|
|
|
|
Oyster::Math3D::Float4x4 proj;
|
|
|
|
Oyster::Graphics::Model::Model *model;
|
|
|
|
}privData;
|
|
|
|
|
|
|
|
C_Player::C_Player(void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
C_Player::~C_Player(void)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void C_Player::Init(ModelInitData modelInit)
|
|
|
|
{
|
|
|
|
// load models
|
|
|
|
privData = new myData();
|
|
|
|
privData->model = Oyster::Graphics::API::CreateModel(modelInit.modelPath);
|
|
|
|
privData->model->WorldMatrix = modelInit.world;
|
|
|
|
privData->model->Visible = modelInit.visible;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2013-12-16 11:08:10 +01:00
|
|
|
void C_Player::setPos(Oyster::Math::Float4x4 world)
|
2013-12-16 09:45:12 +01:00
|
|
|
{
|
2013-12-16 11:08:10 +01:00
|
|
|
privData->model->WorldMatrix = world;
|
2013-12-16 09:45:12 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void C_Player::Render()
|
|
|
|
{
|
|
|
|
Oyster::Graphics::API::RenderModel(*(privData->model));
|
|
|
|
}
|
|
|
|
void C_Player::Release()
|
|
|
|
{
|
|
|
|
Oyster::Graphics::API::DeleteModel(privData->model);
|
|
|
|
delete privData;
|
|
|
|
}
|