00001 #ifndef GAMEENTITY_H 00002 #define GAMEENTITY_H 00003 00004 #include "Environment.h" 00005 00014 00015 class Environment; 00016 class Models; 00017 00018 class GameEntity 00019 { 00020 public: 00021 //---------------------------------------------------------------------------------------------------------------------- 00028 //---------------------------------------------------------------------------------------------------------------------- 00029 GameEntity(Environment* _environment, Models* _model,ngl::Vec3 _pos,std::string _type,bool _taken); 00030 //---------------------------------------------------------------------------------------------------------------------- 00032 //---------------------------------------------------------------------------------------------------------------------- 00033 ~GameEntity(); 00034 //---------------------------------------------------------------------------------------------------------------------- 00037 //---------------------------------------------------------------------------------------------------------------------- 00038 void inline setPos(ngl::Vec3 _pos){m_pos = _pos;} 00039 //---------------------------------------------------------------------------------------------------------------------- 00041 //---------------------------------------------------------------------------------------------------------------------- 00042 ngl::Vec3 inline getPos(){return m_pos;} 00043 //---------------------------------------------------------------------------------------------------------------------- 00047 //---------------------------------------------------------------------------------------------------------------------- 00048 void draw(ngl::TransformStack *_tx, ngl::Camera *_cam); 00049 //---------------------------------------------------------------------------------------------------------------------- 00051 //---------------------------------------------------------------------------------------------------------------------- 00052 void update(); 00053 //---------------------------------------------------------------------------------------------------------------------- 00055 //---------------------------------------------------------------------------------------------------------------------- 00056 bool inline getTakenStatus(){return m_taken;} 00057 //---------------------------------------------------------------------------------------------------------------------- 00059 //---------------------------------------------------------------------------------------------------------------------- 00060 void inline setTakenStatus(){m_taken = true;} 00061 //---------------------------------------------------------------------------------------------------------------------- 00063 //---------------------------------------------------------------------------------------------------------------------- 00064 std::string inline getType(){return m_type;} 00065 00066 protected: 00067 //---------------------------------------------------------------------------------------------------------------------- 00069 //---------------------------------------------------------------------------------------------------------------------- 00070 Environment* m_parent; 00071 //---------------------------------------------------------------------------------------------------------------------- 00073 //---------------------------------------------------------------------------------------------------------------------- 00074 Models* m_model; 00075 //---------------------------------------------------------------------------------------------------------------------- 00077 //---------------------------------------------------------------------------------------------------------------------- 00078 ngl::Vec3 m_pos; 00079 //---------------------------------------------------------------------------------------------------------------------- 00081 //---------------------------------------------------------------------------------------------------------------------- 00082 std::string m_type; 00083 //---------------------------------------------------------------------------------------------------------------------- 00085 //---------------------------------------------------------------------------------------------------------------------- 00086 bool m_taken; 00087 //---------------------------------------------------------------------------------------------------------------------- 00089 //---------------------------------------------------------------------------------------------------------------------- 00090 float m_rot; 00091 00092 }; 00093 00094 #endif // GAMEENTITY_H