/*! * @file state.h * Definition of the States-singleton Class */ #ifndef _STATE_H #define _STATE_H #include "base_object.h" // FORWARD DEFINITION class PNode; class WorldEntity; template class tList; //! A Singleton class, that handles some states about orxonox's objects class State : public BaseObject { public: // CAMERA // /** @param camera the PNode to the Camera, @param cameraTarget the PNode to the Camera's target */ static void setCamera(const PNode* camera, const PNode* cameraTarget); /** @returns a Pointer to the PNode of the Camera */ static inline const PNode* getCamera() { return State::camera; }; /** @returns a Pointer to the CameraTarget */ static inline const PNode* getCameraTarget() { return State::cameraTarget; }; // WORLD_ENTITY_LIST // /** @param worldEntityList The World's List of WorldEntities */ static inline void setWorldEntityList(tList* worldEntityList) { State::worldEntityList = worldEntityList; }; /** @returns the List of WorldEntities */ static inline tList* getWorldEntityList() { return State::worldEntityList; }; private: State(); static const PNode* camera; //!< A reference to the camera static const PNode* cameraTarget; //!< a reference to the cameraTarget static tList* worldEntityList; //!< The List of the worldEntities }; #endif /* _STATE_H */