Changeset 4501 in orxonox.OLD for orxonox/trunk/src/util/track
- Timestamp:
- Jun 3, 2005, 11:59:34 AM (19 years ago)
- Location:
- orxonox/trunk/src/util/track
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/track/track_manager.cc
r4496 r4501 409 409 410 410 element = root->FirstChildElement(); 411 411 412 412 413 while( element != NULL) 413 414 { 415 LoadParam<TrackManager>(element, "WorkOn", this, &TrackManager::workOnS, true) 416 .describe("Selects a TrackElement (by name) to work on"); 417 414 418 LoadParam<TrackManager>(element, "Point", this, &TrackManager::addPoint, true) 415 419 .describe("Adds a new Point to the currently selected TrackElement"); … … 418 422 .describe("Sets the Duration of the currently selected TrackElement"); 419 423 420 LoadParam<TrackManager>(element, "SavePoint", this, &TrackManager::setSavePoint, true); 424 LoadParam<TrackManager>(element, "SavePoint", this, &TrackManager::setSavePointS, true) 425 .describe("Sets the current selected Point to a Savepoint, meaning that the curve will be ended and a new one starts, and that one starts again from this point on"); 426 427 LoadParam<TrackManager>(element, "Fork", this, &TrackManager::forkS, true) 428 .describe("Forks the Path into multiple forked Path names seperated by ','"); 429 430 LoadParam<TrackManager>(element, "Join", this, &TrackManager::joinS, true) 431 .describe("Joins multiple joining Path names seperated by ','"); 421 432 422 433 /* 423 if( !strcmp( element->Value(), "SavePoint")) 424 { 425 PRINTF(5)("Loaded Savepoint\n"); 426 setSavePoint(); 434 if( !strcmp( element->Value(), "Fork")) 435 { 436 container = element->FirstChild(); 437 if( container->ToText()) 438 { 439 assert( container->Value() != NULL); 440 PRINTF(4)("Loaded Fork: %s\n", container->Value()); 441 forkS(container->Value()); 442 } 427 443 } 428 444 */ 429 if( !strcmp( element->Value(), "Fork")) 430 { 431 container = element->FirstChild(); 432 if( container->ToText()) 433 { 434 assert( container->Value() != NULL); 435 PRINTF(4)("Loaded Fork: %s\n", container->Value()); 436 forkS(container->Value()); 437 } 438 } 439 else if( !strcmp( element->Value(), "Join")) 440 { 441 container = element->FirstChild(); 442 if( container->ToText()) 443 { 444 assert( container->Value() != NULL); 445 PRINTF0("Loaded Join: %s\n", container->Value()); 446 joinS(container->Value()); 447 } 448 } 449 else if( !strcmp( element->Value(), "WorkOn")) 450 { 451 container = element->FirstChild(); 452 if( container->ToText()) 453 { 454 assert( container->Value() != NULL); 455 PRINTF(4)("Loaded WorkOn: %s\n", container->Value()); 456 workOn( container->Value()); 457 } 458 } 459 445 /* 446 if( !strcmp( element->Value(), "Join")) 447 { 448 container = element->FirstChild(); 449 if( container->ToText()) 450 { 451 assert( container->Value() != NULL); 452 PRINTF0("Loaded Join: %s\n", container->Value()); 453 joinS(container->Value()); 454 } 455 } 456 */ 460 457 element = element->NextSiblingElement(); 461 458 } … … 545 542 \param trackName the Name of the Track to work on 546 543 */ 547 void TrackManager::workOn (const char* trackName)544 void TrackManager::workOnS(const char* trackName) 548 545 { 549 546 TrackElement* tmpElem = this->firstTrackElem->findByName(trackName); … … 658 655 \todo this must be better 659 656 */ 660 void TrackManager::setSavePoint (int isLoadable)661 { 662 this-> setSavePoint();657 void TrackManager::setSavePointS(const char* nextElementName) 658 { 659 this->firstTrackElem->findByID(this->setSavePoint(NULL))->setName(nextElementName); 663 660 } 664 661 … … 743 740 { 744 741 this->firstTrackElem->findByID(trackIDs[i])->setName(strings.getString(i)); 745 } 742 } 743 delete []trackIDs; 746 744 } 747 745 -
orxonox/trunk/src/util/track/track_manager.h
r4496 r4501 146 146 // Methods to change the Path (initialisation) 147 147 void workOn(unsigned int trackID); 148 void workOn (const char* trackName);148 void workOnS(const char* trackName); 149 149 150 150 /** \see setCurveType(CurveType curveType, TrackElement* trackElem); \param curveType the type of the Curve */ … … 156 156 void addPointV(Vector newPoint, TrackElement* trackElem = NULL); 157 157 int addHotPoint(Vector newPoint, TrackElement* trackElem = NULL); 158 void setSavePoint (int isLoadable);158 void setSavePointS(const char* nextElementName); 159 159 int setSavePoint(TrackElement* trackElem = NULL); 160 160 void fork(unsigned int count, ...);
Note: See TracChangeset
for help on using the changeset viewer.