Changeset 7014 in orxonox.OLD for trunk/src/util
- Timestamp:
- Feb 3, 2006, 2:14:22 PM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/state.cc
r6874 r7014 18 18 #include "state.h" 19 19 20 21 #include "camera.h" 22 20 23 #ifndef NULL 21 24 #define NULL 0 … … 26 29 27 30 28 PNode* State::camera = NULL; 29 PNode* State::cameraTarget = NULL; 31 Camera* State::camera = NULL; 32 CameraTarget* State::cameraTarget = NULL; 33 34 PNode* State::cameraNode = NULL; 35 PNode* State::cameraTargetNode = NULL; 30 36 31 37 SkyBox* State::skyBox = NULL; … … 49 55 * sets camera and target of the current Camera 50 56 */ 51 void State::setCamera( PNode* camera, PNode* cameraTarget)57 void State::setCamera(Camera* camera, CameraTarget* cameraTarget) 52 58 { 53 59 State::camera = camera; 54 60 State::cameraTarget = cameraTarget; 61 State::cameraNode = camera; 62 State::cameraTargetNode = cameraTarget; 55 63 } -
trunk/src/util/state.h
r6874 r7014 10 10 // FORWARD DECLARATION 11 11 class PNode; 12 class Camera; 13 class CameraTarget; 12 14 class WorldEntity; 13 15 class Player; … … 30 32 ////////////// 31 33 /** @param camera the PNode to the Camera, @param cameraTarget the PNode to the Camera's target */ 32 static void setCamera(PNode* camera, PNode* cameraTarget); 34 static void setCamera(Camera* camera, CameraTarget* cameraTarget); 35 static inline Camera* getCamera() { return State::camera; }; 36 static inline CameraTarget* getCameraTarget() { return State::cameraTarget; }; 33 37 /** @returns a Pointer to the PNode of the Camera */ 34 static inline PNode* getCamera () { return State::camera; };38 static inline PNode* getCameraNode() { return State::cameraNode; }; 35 39 /** @returns a Pointer to the CameraTarget */ 36 static inline PNode* getCameraTarget () { return State::cameraTarget; };40 static inline PNode* getCameraTargetNode() { return State::cameraTargetNode; }; 37 41 38 42 //////////////// … … 95 99 State(); 96 100 97 static PNode* camera; //!< A reference to the camera 98 static PNode* cameraTarget; //!< A reference to the cameraTarget 101 static Camera* camera; //!< The current Camera. 102 static CameraTarget* cameraTarget; //!< The Camera Target. 103 static PNode* cameraNode; //!< A reference to the camera 104 static PNode* cameraTargetNode; //!< A reference to the cameraTarget 99 105 static PNode* nullParent; //!< A reference to the Null-PNode. 100 106 static ObjectManager* objectManager; //!< A reference to the current ObjectManager
Note: See TracChangeset
for help on using the changeset viewer.