Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/util/state.h @ 6461

Last change on this file since 6461 was 6459, checked in by patrick, 19 years ago

network: skybox parenting fix

File size: 2.2 KB
RevLine 
[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
[6459]9
[5405]10// FORWARD DECLARATION
[4293]11class PNode;
[4827]12class WorldEntity;
[6142]13class ObjectManager;
[6459]14class StoryEntity;
[3655]15
[5405]16//! handles states about orxonox's most importatn objects
17/**
18 * This is an abstract Class-container, not really a Class.
19 * in this Class only static references to the most important
20 * Objects/List/etc. are stored.
21 */
22class State {
[3655]23
24 public:
[6142]25   //////////////
26   /// CAMERA ///
27   //////////////
[4827]28  /** @param camera the PNode to the Camera, @param cameraTarget the PNode to the Camera's target */
[6222]29  static void setCamera(PNode* camera, PNode* cameraTarget);
[4827]30  /** @returns a Pointer to the PNode of the Camera */
[6222]31  static inline PNode* getCamera() { return State::camera; };
[4827]32  /** @returns a Pointer to the CameraTarget */
[6222]33  static inline PNode* getCameraTarget() { return State::cameraTarget; };
[4485]34
[6142]35  //////////////////////
36  /// OBJECT-MANAGER ///
37  //////////////////////
38  /** @param objectManager the new Current ObjectManager */
39  static inline void setObjectManager(ObjectManager* objectManager) { State::objectManager = objectManager; };
40  /** @returns the current ObjectManager. */
41  static inline ObjectManager* getObjectManager() { return State::objectManager; };
[3655]42
[6459]43  //////////////////////
44  /// STORY-ENTITY   ///
45  //////////////////////
46  /** @param storyEntity sets the current StoryEntity that is been played */
47  static inline void setCurrentStoryEntity(StoryEntity* storyEntity) { State::storyEntity = storyEntity; };
48  /** @returns the current StoryEntity played */
49  static inline StoryEntity* getCurrentStoryEntity() { return State::storyEntity; };
50
51
[6142]52  /////////////////////////
53  /// WORLD_ENTITY_LIST ///
54  /////////////////////////
55
[3655]56 private:
[4746]57  State();
[4293]58
[6222]59  static PNode*                 camera;             //!< A reference to the camera
60  static PNode*                 cameraTarget;       //!< A reference to the cameraTarget
[5405]61  static PNode*                 nullParent;         //!< A reference to the Null-PNode.
[6459]62  static ObjectManager*         objectManager;      //!< A reference to the current ObjectManager
63  static StoryEntity*           storyEntity;        //!< A reference to the current StoryEntity played
[4827]64
[3655]65};
66
[4293]67#endif /* _STATE_H */
Note: See TracBrowser for help on using the repository browser.