Last change
on this file since 6224 was
6222,
checked in by bensch, 19 years ago
|
orxonox/trunk: merged the christmas branche to the trunk
merged with command:
svn merge -r6165:HEAD christmas_branche/ ../trunk/
no conflicts
|
File size:
1.7 KB
|
Rev | Line | |
---|
[4597] | 1 | /*! |
---|
[5039] | 2 | * @file state.h |
---|
[5405] | 3 | * Definition of the States Class |
---|
[3655] | 4 | */ |
---|
| 5 | |
---|
[4293] | 6 | #ifndef _STATE_H |
---|
| 7 | #define _STATE_H |
---|
[3655] | 8 | |
---|
[5405] | 9 | // FORWARD DECLARATION |
---|
[4293] | 10 | class PNode; |
---|
[4827] | 11 | class WorldEntity; |
---|
[6142] | 12 | class ObjectManager; |
---|
[3655] | 13 | |
---|
[5405] | 14 | //! handles states about orxonox's most importatn objects |
---|
| 15 | /** |
---|
| 16 | * This is an abstract Class-container, not really a Class. |
---|
| 17 | * in this Class only static references to the most important |
---|
| 18 | * Objects/List/etc. are stored. |
---|
| 19 | */ |
---|
| 20 | class State { |
---|
[3655] | 21 | |
---|
| 22 | public: |
---|
[6142] | 23 | ////////////// |
---|
| 24 | /// CAMERA /// |
---|
| 25 | ////////////// |
---|
[4827] | 26 | /** @param camera the PNode to the Camera, @param cameraTarget the PNode to the Camera's target */ |
---|
[6222] | 27 | static void setCamera(PNode* camera, PNode* cameraTarget); |
---|
[4827] | 28 | /** @returns a Pointer to the PNode of the Camera */ |
---|
[6222] | 29 | static inline PNode* getCamera() { return State::camera; }; |
---|
[4827] | 30 | /** @returns a Pointer to the CameraTarget */ |
---|
[6222] | 31 | static inline PNode* getCameraTarget() { return State::cameraTarget; }; |
---|
[4485] | 32 | |
---|
[6142] | 33 | ////////////////////// |
---|
| 34 | /// OBJECT-MANAGER /// |
---|
| 35 | ////////////////////// |
---|
| 36 | /** @param objectManager the new Current ObjectManager */ |
---|
| 37 | static inline void setObjectManager(ObjectManager* objectManager) { State::objectManager = objectManager; }; |
---|
| 38 | /** @returns the current ObjectManager. */ |
---|
| 39 | static inline ObjectManager* getObjectManager() { return State::objectManager; }; |
---|
[3655] | 40 | |
---|
[6142] | 41 | ///////////////////////// |
---|
| 42 | /// WORLD_ENTITY_LIST /// |
---|
| 43 | ///////////////////////// |
---|
| 44 | |
---|
[3655] | 45 | private: |
---|
[4746] | 46 | State(); |
---|
[4293] | 47 | |
---|
[6222] | 48 | static PNode* camera; //!< A reference to the camera |
---|
| 49 | static PNode* cameraTarget; //!< A reference to the cameraTarget |
---|
[5405] | 50 | static PNode* nullParent; //!< A reference to the Null-PNode. |
---|
[6142] | 51 | static ObjectManager* objectManager; //!< A referenct to the current ObjectManager |
---|
[4827] | 52 | |
---|
[3655] | 53 | }; |
---|
| 54 | |
---|
[4293] | 55 | #endif /* _STATE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.