Last change
on this file since 6219 was
6142,
checked in by bensch, 19 years ago
|
orxonox/trunk: merge the ObjectManager to the trunk
merged with command:
svn merge -r6082:HEAD objectmanager/ ../trunk/
conflicts resolution was easy this time
but specially merged the world to network_world
|
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 */ |
---|
| 27 | static void setCamera(const PNode* camera, const PNode* cameraTarget); |
---|
| 28 | /** @returns a Pointer to the PNode of the Camera */ |
---|
| 29 | static inline const PNode* getCamera() { return State::camera; }; |
---|
| 30 | /** @returns a Pointer to the CameraTarget */ |
---|
| 31 | static inline const 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 | |
---|
[4827] | 48 | static const PNode* camera; //!< A reference to the camera |
---|
[5405] | 49 | static const PNode* cameraTarget; //!< A reference to the cameraTarget |
---|
| 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.