Changeset 4293 in orxonox.OLD for orxonox/branches/physics/src/util/state.cc
- Timestamp:
- May 26, 2005, 10:34:14 AM (20 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/util/state.cc
r4289 r4293 10 10 11 11 ### File Specific: 12 main-programmer: ...12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 14 */ … … 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 17 17 18 #include " proto_singleton.h"18 #include "state.h" 19 19 20 20 using namespace std; … … 24 24 \brief standard constructor 25 25 */ 26 ProtoSingleton::ProtoSingleton()26 State::State () 27 27 { 28 this->setClassName (" ProtoSingleton");28 this->setClassName ("State"); 29 29 30 this->camera = NULL; 31 this->cameraTarget = NULL; 30 32 } 31 33 … … 33 35 \brief the singleton reference to this class 34 36 */ 35 ProtoSingleton* ProtoSingleton::singletonRef = NULL;37 State* State::singletonRef = NULL; 36 38 37 39 /** 38 40 \returns a Pointer to this Class 39 41 */ 40 ProtoSingleton* ProtoSingleton::getInstance(void)42 State* State::getInstance(void) 41 43 { 42 if (! ProtoSingleton::singletonRef)43 ProtoSingleton::singletonRef = new ProtoSingleton();44 return ProtoSingleton::singletonRef;44 if (!State::singletonRef) 45 State::singletonRef = new State(); 46 return State::singletonRef; 45 47 } 46 48 … … 49 51 50 52 */ 51 ProtoSingleton::~ProtoSingleton()53 State::~State () 52 54 { 53 ProtoSingleton::singletonRef = NULL;55 State::singletonRef = NULL; 54 56 55 57 } 58 59 /** 60 \sets camera and target of the current Camera 61 */ 62 void State::setCamera(const PNode* camera, const PNode* cameraTarget) 63 { 64 this->camera = camera; 65 this->cameraTarget = cameraTarget; 66 }
Note: See TracChangeset
for help on using the changeset viewer.