#include "CStation.h"

const float CStation::distanceConstruction = 20.0f;

CStation::CStation(scene::ISceneManager *smg,video::IVideoDriver* dr)
{
    smgr=smg;
    driver=dr;
    meshChalet = smgr->getMesh("media/Alpine_chalet.obj");

    material.setTexture(0,driver->getTexture("media/Diffuse_map.png"));
    material.setTexture(1,driver->getTexture("media/Normal_map.png"));
    material.setTexture(2,driver->getTexture("media/Metallic_map.png"));
    material.setTexture(3,driver->getTexture("media/Roughness_map.png"));
}

void CStation::SetName(core::stringc n)
{
	stationName=n;
}

void CStation::SetPosition(core::vector3df p)
{
	position=p;
}

core::vector3df CStation::GetPosition() {
    return position;
}

void CStation::DrawStation() {
    nodeChalet=smgr->addMeshSceneNode( meshChalet );
    nodeChalet->setScale(core::vector3df(2,2,2));
    nodeChalet->getMaterial(0) = material;
    nodeChalet->setMaterialFlag(video::EMF_LIGHTING, false);
    nodeChalet->setPosition(position);
    nodeChalet->setRotation(core::vector3df(0,270,0));
}

CStation::~CStation()
{

}
