Changeset 3374 in orxonox.OLD for orxonox/branches/trackManager/src/world.cc
- Timestamp:
- Jan 8, 2005, 12:04:19 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/trackManager/src/world.cc
r3373 r3374 19 19 #include "collision.h" 20 20 #include "track_manager.h" 21 #include "track.h"22 21 #include "player.h" 23 22 #include "command_node.h" … … 250 249 this->nullParent->setName ("NullParent"); 251 250 252 // create some path nodes253 this->pathnodes = new Vector[6];254 this->pathnodes[0] = Vector(0, 0, 0);255 this->pathnodes[1] = Vector(1000, 0, 0);256 // this->pathnodes[2] = Vector(-100, 140, 0);257 // this->pathnodes[3] = Vector(0, 180, 0);258 // this->pathnodes[4] = Vector(100, 140, 0);259 // this->pathnodes[5] = Vector(100, 40, 0);260 261 // create the tracks262 this->tracklen = 2;263 this->track = new Track[2];264 for( int i = 0; i < this->tracklen; i++)265 {266 this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);267 }268 251 // !\todo old track-system has to be removed 269 252 … … 323 306 324 307 325 326 // create the tracks327 this->tracklen = 6;328 this->track = new Track[6];329 for( int i = 0; i < this->tracklen; i++)330 {331 this->track[i] = Track( i, (i+1)%this->tracklen, &this->pathnodes[i], &this->pathnodes[(i+1)%this->tracklen]);332 }333 308 334 309 // create a player … … 522 497 } 523 498 */ 524 //draw track525 glBegin(GL_LINES);526 glColor3f(0.0, 1.0, 1.0);527 for( int i = 0; i < tracklen; i++)528 {529 glVertex3f(pathnodes[i].x,pathnodes[i].y,pathnodes[i].z);530 glVertex3f(pathnodes[(i+1)%tracklen].x,pathnodes[(i+1)%tracklen].y,pathnodes[(i+1)%tracklen].z);531 }532 glEnd();533 534 499 /* 535 500 glBegin(GL_LINE_STRIP); … … 710 675 void World::unload() 711 676 { 712 if( pathnodes) delete []pathnodes; 713 if( track) delete []pathnodes; 714 } 715 716 717 void World::setTrackLen(Uint32 len) 718 { 719 this->tracklen = len; 720 } 721 722 int World::getTrackLen() 723 { 724 return this->tracklen; 725 } 726 677 678 } 727 679 728 680
Note: See TracChangeset
for help on using the changeset viewer.