Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3374 in orxonox.OLD for orxonox/branches/trackManager/src/world.cc


Ignore:
Timestamp:
Jan 8, 2005, 12:04:19 PM (21 years ago)
Author:
bensch
Message:

orxonox/branches/trackManager: deleted old track-system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/trackManager/src/world.cc

    r3373 r3374  
    1919#include "collision.h"
    2020#include "track_manager.h"
    21 #include "track.h"
    2221#include "player.h"
    2322#include "command_node.h"
     
    250249            this->nullParent->setName ("NullParent");
    251250
    252             // create some path nodes
    253             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 tracks
    262             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               }
    268251            // !\todo old track-system has to be removed
    269252
     
    323306
    324307
    325 
    326             // create the tracks
    327             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               }
    333308
    334309            // create a player
     
    522497    }
    523498  */ 
    524   //draw track
    525   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  
    534499  /*
    535500  glBegin(GL_LINE_STRIP);
     
    710675void World::unload()
    711676{
    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}
    727679
    728680
Note: See TracChangeset for help on using the changeset viewer.