Changeset 3588 in orxonox.OLD for orxonox/trunk/src/track_manager.cc
- Timestamp:
- Mar 17, 2005, 2:47:16 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/track_manager.cc
r3556 r3588 37 37 this->mainJoin = false; 38 38 this->ID = -1; 39 this->startingTime = 0; //!< \todo eventually set this to the max time of TrackManager.40 this->duration = 1;39 this->startingTime = 0; 40 this->duration = TMAN_DEFAULT_DURATION; 41 41 this->endTime = 1; 42 42 this->jumpTime = 0; 43 this->curveType = BEZIERCURVE;44 43 this->nodeCount = 0; 45 44 this->childCount = 0; … … 115 114 116 115 /** 116 \param name the Name to set. 117 */ 118 void TrackElement::setName(const char* name) 119 { 120 // delete the old name 121 if (this->name) 122 delete []this->name; 123 // if a name was given already. 124 if (name) 125 { 126 this->name = new char[strlen(name)+1]; 127 strcpy(this->name, name); 128 } 129 else 130 this->name = NULL; 131 } 132 133 /** 134 \returns The name of this TrackElement 135 */ 136 char* TrackElement::getName(void) const 137 { 138 return this->name; 139 } 140 141 142 /** 117 143 \brief CONDITION that chooses the first child for the decision (static) 118 144 \param nothing Nothing in this function … … 266 292 this->addPoint(this->currentTrackElem->curve->getNode(this->currentTrackElem->curve->getNodeCount()), this->currentTrackElem->children[i]); 267 293 } 294 if (childCount == 1) 295 this->currentTrackElem->children[0]->setName(this->currentTrackElem->getName()); 268 296 } 269 297 … … 307 335 return; 308 336 } 309 t rackElem->curveType = curveType;337 this->curveType = curveType; 310 338 switch (curveType) 311 339 { … … 348 376 if (trackElem->isFresh) 349 377 { 350 this->setCurveType( BEZIERCURVE, trackElem);378 this->setCurveType(TMAN_DEFAULT_CURVETYPE, trackElem); 351 379 trackElem->isFresh = false; 352 380 } … … 757 785 TrackElement* tmpElem = this->findTrackElementByID(i); 758 786 PRINT(0)("--== TrackElement:%i ==--", tmpElem->ID); 759 if(tmpElem-> name)760 PRINT(0)("Name: %s::", tmpElem-> name);787 if(tmpElem->getName()) 788 PRINT(0)("Name: %s::", tmpElem->getName()); 761 789 if(tmpElem->isFresh) 762 790 PRINT(0)(" -- has not jet eddited in any way --\n");
Note: See TracChangeset
for help on using the changeset viewer.