Last change
on this file since 6334 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
|
Line | |
---|
1 | /*! |
---|
2 | * @file state.h |
---|
3 | * Definition of the States Class |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _STATE_H |
---|
7 | #define _STATE_H |
---|
8 | |
---|
9 | // FORWARD DECLARATION |
---|
10 | class PNode; |
---|
11 | class WorldEntity; |
---|
12 | class ObjectManager; |
---|
13 | |
---|
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 { |
---|
21 | |
---|
22 | public: |
---|
23 | ////////////// |
---|
24 | /// CAMERA /// |
---|
25 | ////////////// |
---|
26 | /** @param camera the PNode to the Camera, @param cameraTarget the PNode to the Camera's target */ |
---|
27 | static void setCamera(PNode* camera, PNode* cameraTarget); |
---|
28 | /** @returns a Pointer to the PNode of the Camera */ |
---|
29 | static inline PNode* getCamera() { return State::camera; }; |
---|
30 | /** @returns a Pointer to the CameraTarget */ |
---|
31 | static inline PNode* getCameraTarget() { return State::cameraTarget; }; |
---|
32 | |
---|
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; }; |
---|
40 | |
---|
41 | ///////////////////////// |
---|
42 | /// WORLD_ENTITY_LIST /// |
---|
43 | ///////////////////////// |
---|
44 | |
---|
45 | private: |
---|
46 | State(); |
---|
47 | |
---|
48 | static PNode* camera; //!< A reference to the camera |
---|
49 | static PNode* cameraTarget; //!< A reference to the cameraTarget |
---|
50 | static PNode* nullParent; //!< A reference to the Null-PNode. |
---|
51 | static ObjectManager* objectManager; //!< A referenct to the current ObjectManager |
---|
52 | |
---|
53 | }; |
---|
54 | |
---|
55 | #endif /* _STATE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.