- Timestamp:
- Jan 5, 2005, 1:49:13 AM (20 years ago)
- Location:
- orxonox/branches/parenting/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/track_manager.cc
r3333 r3335 64 64 65 65 /** 66 \brief reserves Space for childCount children67 \param childCount The Count of children to make space for.68 */69 void TrackElement::initChildren(unsigned int childCount)70 {71 this->childCount = childCount;72 this->children = new TrackElement*[childCount];73 for (int i=0; i<childCount; i++)74 this->children[i] = new TrackElement();75 }76 77 /**78 66 \brief Searches through all the TrackElements for trackID. 79 67 \param trackID The ID to search for. … … 108 96 \brief standard constructor 109 97 110 \todo this constructor is not jet implemented - do it111 98 */ 112 99 TrackManager::TrackManager () … … 115 102 116 103 PRINTF(3)("Initializing the TrackManager\n"); 117 this->firstTrackElem = NULL;104 this->firstTrackElem = new TrackElement; 118 105 this->currentTrackElem = firstTrackElem; 119 106 this->localTime = 0; … … 126 113 \brief standard destructor 127 114 128 \todo this deconstructor is not jet implemented - do it129 115 */ 130 116 TrackManager::~TrackManager () … … 134 120 PRINTF(3)("Deleting all the TrackElements\n"); 135 121 delete this->firstTrackElem; 122 136 123 // we do not have a TrackManager anymore 137 124 singletonRef = NULL; … … 151 138 else 152 139 return singletonRef = new TrackManager(); 140 } 141 142 /** 143 \brief reserves Space for childCount children 144 \param childCount The Count of children to make space for. 145 */ 146 void TrackManager::initChildren(unsigned int childCount) 147 { 148 trackElemCount = 0; 149 this->currentTrackElem->childCount = childCount; 150 this->currentTrackElem->children = new TrackElement*[childCount]; 151 for (int i=0; i<childCount; i++) 152 this->currentTrackElem->children[i] = new TrackElement(); 153 153 } 154 154 … … 251 251 this->currentTrackElem->isSavePoint = true; 252 252 253 this-> currentTrackElem->initChildren(1);253 this->initChildren(1); 254 254 } 255 255 … … 290 290 this->currentTrackElem->isFork = true; 291 291 292 this-> currentTrackElem->initChildren(count);292 this->initChildren(count); 293 293 } 294 294 -
orxonox/branches/parenting/src/track_manager.h
r3333 r3335 32 32 TrackElement(void); 33 33 ~TrackElement(void); 34 35 void initChildren(unsigned int childCount);36 34 37 35 TrackElement* findByID(unsigned int trackID); … … 103 101 int trackElemCount; //!< The count of TrackElements that exist. 104 102 103 void initChildren(unsigned int childCount); 105 104 106 105 TrackElement* findTrackElementByID(unsigned int trackID) const; -
orxonox/branches/parenting/src/world.cc
r3334 r3335 18 18 #include "world_entity.h" 19 19 #include "collision.h" 20 #include "track_manager.h" 20 21 #include "track.h" 21 22 #include "player.h" … … 143 144 if(this->debugWorldNr != -1) 144 145 { 146 trackManager = TrackManager::getInstance(); 145 147 switch(this->debugWorldNr) 146 148 { -
orxonox/branches/parenting/src/world.h
r3327 r3335 11 11 12 12 13 13 class TrackManager; 14 14 class Track; 15 15 class WorldEntity; … … 61 61 62 62 // base level data 63 TrackManager* trackManager; 63 64 Track* track; 64 65 Uint32 tracklen; // number of Tracks the World consist of
Note: See TracChangeset
for help on using the changeset viewer.