#ifndef CTSFIXE_H_INCLUDED
#define CTSFIXE_H_INCLUDED

#include <irrlicht.h>
#include "CRemontee.h"

using namespace irr;

class CTSFixe : public CRemontee
{
    public:

	CTSFixe(scene::ISceneManager*,video::IVideoDriver*);

	~CTSFixe();

	virtual void SetPositionDepart(core::vector3df);
	virtual void SetPositionArrivee(core::vector3df);
	virtual core::vector3df GetPositionDepart();
	virtual core::vector3df GetPositionArrivee();
    virtual void DrawRemonteeDepart();
    virtual void DrawRemonteeArrivee();

    virtual void SetID(core::stringc);
	virtual core::stringc GetID();

    virtual void RedrawCable();
    virtual void AnimateRm(core::vector3df,f32);
    virtual void PlaceVehicules();
    virtual core::vector3df GetRotationRM();
    virtual void UpdateTroncons();

	private:

    core::vector3df positionDepart;
    core::vector3df positionArrivee;

	scene::ISceneManager* smgr;
	video::IVideoDriver* driver;

	scene::IAnimatedMesh* meshDepart;
    scene::IMeshSceneNode* nodeDepart;
    video::SMaterial materialDepart;

    scene::IAnimatedMesh* meshPoulieDepart;
    scene::IMeshSceneNode* nodePoulieDepart;
    video::SMaterial materialPoulieDepart;
    scene::ISceneNode* posMonteePoulieDepart;
    scene::ISceneNode* posDescentePoulieDepart;

    scene::IAnimatedMesh* meshArrivee;
    scene::IMeshSceneNode* nodeArrivee;
    video::SMaterial materialArrivee;

    scene::IAnimatedMesh* meshPoulieArrivee;
    scene::IMeshSceneNode* nodePoulieArrivee;
    video::SMaterial materialPoulieArrivee;
    scene::ISceneNode* posMonteePoulieArrivee;
    scene::ISceneNode* posDescentePoulieArrivee;

    scene::IAnimatedMesh* meshGaletDepartM;
    scene::IMeshSceneNode* nodeGaletDepartM;
    scene::IAnimatedMesh* meshGaletDepartM2;
    scene::IMeshSceneNode* nodeGaletDepartM2;
    scene::IAnimatedMesh* meshGaletDepartM3;
    scene::IMeshSceneNode* nodeGaletDepartM3;
    scene::IAnimatedMesh* meshGaletDepartM4;
    scene::IMeshSceneNode* nodeGaletDepartM4;
    scene::IAnimatedMesh* meshGaletDepartM5;
    scene::IMeshSceneNode* nodeGaletDepartM5;
    scene::IAnimatedMesh* meshGaletDepartM6;
    scene::IMeshSceneNode* nodeGaletDepartM6;
    scene::IAnimatedMesh* meshGaletDepartM7;
    scene::IMeshSceneNode* nodeGaletDepartM7;
    scene::IAnimatedMesh* meshGaletDepartM8;
    scene::IMeshSceneNode* nodeGaletDepartM8;
    scene::IAnimatedMesh* meshGaletDepartD;
    scene::IMeshSceneNode* nodeGaletDepartD;
    scene::IAnimatedMesh* meshGaletDepartD2;
    scene::IMeshSceneNode* nodeGaletDepartD2;
    scene::IAnimatedMesh* meshGaletDepartD3;
    scene::IMeshSceneNode* nodeGaletDepartD3;
    scene::IAnimatedMesh* meshGaletDepartD4;
    scene::IMeshSceneNode* nodeGaletDepartD4;
    scene::IAnimatedMesh* meshGaletDepartD5;
    scene::IMeshSceneNode* nodeGaletDepartD5;
    scene::IAnimatedMesh* meshGaletDepartD6;
    scene::IMeshSceneNode* nodeGaletDepartD6;
    scene::IAnimatedMesh* meshGaletDepartD7;
    scene::IMeshSceneNode* nodeGaletDepartD7;
    scene::IAnimatedMesh* meshGaletDepartD8;
    scene::IMeshSceneNode* nodeGaletDepartD8;

    scene::ISceneNode* posGaletDepartMontee;
    scene::ISceneNode* posGaletDepartDescente;
    scene::ISceneNode* posGaletDepartMontee4;
    scene::ISceneNode* posGaletDepartDescente4;

    scene::IAnimatedMesh* meshGaletArriveeM;
    scene::IMeshSceneNode* nodeGaletArriveeM;
    //video::SMaterial materialGaletArriveeM;

    scene::IAnimatedMesh* meshGaletArriveeD;
    scene::IMeshSceneNode* nodeGaletArriveeD;
    //video::SMaterial materialGaletArriveeD;

    scene::ISceneNode* posGaletArriveeMontee;
    scene::ISceneNode* posGaletArriveeDescente;

    u32 findNextPyloneWithDescente(u32);
    u32 findPreviousPyloneWithDescente(u32);
};


#endif // CTSFIXE_H_INCLUDED
