Changeset 3543 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 14, 2005, 10:14:41 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/camera.cc
r3537 r3543 51 51 Camera::~Camera () 52 52 { 53 this->destroy(); 54 } 55 56 /** 57 \brief deletes all allocated memory 58 */ 59 void Camera::destroy(void) 60 { 61 this->bound = NULL; 62 this->world = NULL; 63 64 static_cast<WorldEntity*>(this)->destroy(); 53 65 } 54 66 … … 275 287 276 288 277 /**278 \brief destroy, reset the camera so that it doesn't perform anything anymore279 280 */281 void Camera::destroy()282 {283 this->bound = NULL;284 this->world = NULL;285 } -
orxonox/trunk/src/camera.h
r3365 r3543 7 7 #define _CAMERA_H 8 8 9 #include "stdincl.h"10 9 #include "world_entity.h" 11 12 10 13 11 class World; … … 56 54 public: 57 55 Camera (World* world); 58 ~Camera (); 56 virtual ~Camera (); 57 void destroy(void); 59 58 60 59 void timeSlice (Uint32 deltaT); 61 60 void apply (); 62 61 void bind (WorldEntity* entity); 63 void destroy();64 62 65 63 void setWorld(World* world); -
orxonox/trunk/src/glmenu/glmenu_imagescreen.cc
r3536 r3543 19 19 #include "glmenu_imagescreen.h" 20 20 21 #include "stdincl.h" 21 22 #include "material.h" 22 23 … … 27 28 GLMenuImageScreen* GLMenuImageScreen::getInstance() 28 29 { 29 if( singletonRef == NULL)30 if(!singletonRef) 30 31 singletonRef = new GLMenuImageScreen (); 31 32 return singletonRef; … … 45 46 /** 46 47 \brief standard deconstructor 48 */ 49 GLMenuImageScreen::~GLMenuImageScreen() 50 { 51 this->destroy(); 52 } 53 54 /** 55 \brief deletes all alocated Memory and also deletes everything from the Class this one is erived from 47 56 48 57 \todo this deconstructor is not jet implemented - do it 49 58 */ 50 GLMenuImageScreen::~GLMenuImageScreen() 59 void GLMenuImageScreen::destroy(void) 51 60 { 52 61 if (backMat) 53 62 delete backMat; 54 } 55 63 64 static_cast<BaseObject*>(this)->destroy(); 65 } 56 66 57 67 /** -
orxonox/trunk/src/glmenu/glmenu_imagescreen.h
r3476 r3543 8 8 #define _GLMENU_IMAGESCREEN_H 9 9 10 #include " stdincl.h"11 class Texture; 10 #include "base_object.h" 11 12 12 class Material; 13 13 … … 19 19 public: 20 20 ~GLMenuImageScreen (); 21 void destroy(void); 21 22 22 23 static GLMenuImageScreen* getInstance(); -
orxonox/trunk/src/keynames.cc
r3230 r3543 15 15 16 16 #include "keynames.h" 17 18 #include "stdincl.h" 17 19 18 20 #include <string.h> -
orxonox/trunk/src/keynames.h
r3230 r3543 7 7 #ifndef _KEYNAMES_H 8 8 #define _KEYNAMES_H 9 10 11 #ifdef __WIN32__12 #include <windows.h>13 #endif14 15 #ifndef __APPLE__16 #include <SDL/SDL.h>17 #else18 #include <SDL.h>19 #endif20 9 21 10 /** -
orxonox/trunk/src/lib/coord/null_parent.cc
r3533 r3543 26 26 NullParent* NullParent::getInstance () 27 27 { 28 if( singletonRef == NULL)28 if(!singletonRef) 29 29 singletonRef = new NullParent (); 30 30 return singletonRef; -
orxonox/trunk/src/lib/coord/p_node.cc
r3537 r3543 22 22 23 23 #include "p_node.h" 24 24 25 #include "null_parent.h" 26 #include "vector.h" 25 27 26 28 using namespace std; -
orxonox/trunk/src/lib/coord/p_node.h
r3537 r3543 22 22 #define _P_NODE_H 23 23 24 #include " stdincl.h"24 #include "base_object.h" 25 25 26 26 // FORWARD DEFINITION \\ 27 27 class PNode; /* forward decleration, so that parentEntry has access to PNode */ 28 class Quaternion; 29 class Vector; 28 30 29 31 //! enumeration for the different translation-binding-types -
orxonox/trunk/src/light.cc
r3453 r3543 52 52 Light::~Light () 53 53 { 54 this->destroy(); 55 } 56 57 58 /** 59 \brief frees all alocated memory 60 61 and in this case also deletes the lightSources and GL_LIGHTING 62 */ 63 void Light::destroy(void) 64 { 54 65 glDisable(GL_LIGHTING); 55 66 … … 58 69 delete lights; 59 70 Light::singletonRef = NULL; 60 } 71 72 static_cast<WorldEntity*>(this)->destroy(); 73 } 74 61 75 62 76 /** -
orxonox/trunk/src/light.h
r3453 r3543 60 60 public: 61 61 static Light* getInstance(); 62 ~Light(void); 62 virtual ~Light(void); 63 void destroy(void); 64 63 65 64 66 // set Attributes -
orxonox/trunk/src/orxonox.cc
r3526 r3543 48 48 Orxonox::~Orxonox () 49 49 { 50 this->destroy(); 51 } 52 53 /** 54 \brief destroys orxonox. Frees al memory and so on. 55 */ 56 void Orxonox::destroy(void) 57 { 50 58 Orxonox::singletonRef = NULL; 51 59 if( world != NULL) delete world; … … 53 61 if( localcamera != NULL) delete localcamera; 54 62 if( resources != NULL) delete resources; 55 } 56 63 64 65 } 57 66 58 67 /** \brief this is a singleton class to prevent duplicates */ -
orxonox/trunk/src/orxonox.h
r3449 r3543 24 24 static Orxonox* singletonRef; 25 25 Orxonox (); 26 ~Orxonox (); 27 26 virtual ~Orxonox (); 27 void destroy(void); 28 28 29 char configfilename[256]; //!< Filename of the configuration-file. 29 30 World* world; //!< Reference to the current running world. -
orxonox/trunk/src/proto_class.cc
r3365 r3543 19 19 #include "proto_class.h" 20 20 21 #include "stdincl.h" // maybe 21 22 22 23 using namespace std; … … 35 36 /** 36 37 \brief standard deconstructor 37 \todo this deconstructor is not jet implemented - do it38 38 39 39 */ 40 ProtoClass::~ProtoClass () {} 40 ProtoClass::~ProtoClass () 41 { 42 this->destroy(); 43 } 41 44 45 /** 46 \brief deletes all data and also deletes all data from the class this is derived from 47 */ 48 ProtoClass::~destroy(void) 49 { 50 // delete what has to be deleted here 51 static_cast<BaseObject*>(this)->destroy(); 52 } 42 53 43 54 /** -
orxonox/trunk/src/proto_class.h
r3365 r3543 11 11 #define _PROTO_CLASS_H 12 12 13 #include "stdincl.h" 13 #include "what realy has to be included" 14 #include "base_object.h" 15 16 // FORWARD DEFINITION \\ 17 class someClassWeNeed; 18 14 19 15 20 /*class Test;*/ /* forward definition of class Test (without including it here!)*/ … … 22 27 23 28 public: 24 ProtoClass (); 25 ~ProtoClass (); 29 ProtoClass(); 30 virtual ~ProtoClass(); 31 void destroy(void) 26 32 27 33 bool doNonSense (int nothing); -
orxonox/trunk/src/story_entities/world.cc
r3539 r3543 258 258 259 259 //localCamera->setParent(TrackNode::getInstance()); 260 this->localPlayer->addChild (this->localCamera);260 TrackNode::getInstance()->addChild (this->localCamera); 261 261 //Vector* cameraOffset = new Vector (0, 5, -10); 262 262 Vector* cameraOffset = new Vector (-10, 5, 0); -
orxonox/trunk/src/track_manager.cc
r3540 r3543 223 223 /** 224 224 \brief standard destructor 225 226 225 */ 227 226 TrackManager::~TrackManager(void) 227 { 228 this->destroy(); 229 } 230 231 /** 232 \brief deletes all alocated Memory and also deletes everything from the Class this one is erived from 233 */ 234 void TrackManager::destroy(void) 228 235 { 229 236 PRINTF(3)("Destruct TrackManager\n"); … … 234 241 // we do not have a TrackManager anymore 235 242 singletonRef = NULL; 236 } 237 243 244 static_cast<BaseObject*>(this)->destroy(); 245 } 246 247 //! Singleton Reference to TrackManager 238 248 TrackManager* TrackManager::singletonRef = NULL; 239 249 … … 663 673 664 674 Vector v(0.0, 1.0, 0.0); 665 Quaternion q(- 1.57, v);675 Quaternion q(-PI/2, v); 666 676 //this->relDirection = this->relDirection * q; 667 677 quat = quat * q; -
orxonox/trunk/src/track_manager.h
r3527 r3543 121 121 122 122 public: 123 ~TrackManager(void); 123 virtual ~TrackManager(void); 124 void destroy(void); 124 125 static TrackManager* getInstance(void); 125 126
Note: See TracChangeset
for help on using the changeset viewer.