Changeset 3526 in orxonox.OLD for orxonox/trunk/src/story_entities
- Timestamp:
- Mar 13, 2005, 8:00:25 PM (20 years ago)
- Location:
- orxonox/trunk/src/story_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3522 r3526 41 41 World::World (char* name) 42 42 { 43 this->setClassName ("World"); 44 this->worldName = name; 45 this->debugWorldNr = -1; 46 this->entities = new tList<WorldEntity>(); 43 this->init(name, -1); 47 44 } 48 45 … … 53 50 World::World (int worldID) 54 51 { 55 this->debugWorldNr = worldID; 56 this->worldName = NULL; 57 this->entities = new tList<WorldEntity>(); 52 this->init(NULL, worldID); 58 53 } 59 54 … … 94 89 /* this->localPlayer hasn't to be deleted explicitly, it is 95 90 contained in entities*/ 91 } 92 93 /** 94 \brief initializes a new World 95 */ 96 void World::init(char* name, int worldID) 97 { 98 this->setClassName ("World"); 99 100 this->worldName = name; 101 this->debugWorldNr = worldID; 102 this->entities = new tList<WorldEntity>(); 103 104 // Enable default GL stuff 105 glEnable(GL_DEPTH_TEST); 106 96 107 } 97 108 … … 289 300 objectList = glGenLists(1); 290 301 glNewList (objectList, GL_COMPILE); 291 glLoadIdentity(); 302 292 303 glColor3f(1.0,0,0); 293 glBegin(GL_QUADS);294 304 295 305 int sizeX = 100; … … 338 348 } 339 349 350 glBegin(GL_QUADS); 340 351 int snowheight=3; 341 352 for ( int i = 0; i<sizeX; i+=1) … … 410 421 } 411 422 glEnd(); 412 /*413 glBegin(GL_LINES);414 for( float x = -128.0; x < 128.0; x += 25.0)415 {416 for( float y = -128.0; y < 128.0; y += 25.0)417 {418 glColor3f(1,0,0);419 glVertex3f(x,y,-128.0);420 glVertex3f(x,y,0.0);421 glColor3f(0.5,0,0);422 glVertex3f(x,y,0.0);423 glVertex3f(x,y,128.0);424 }425 }426 for( float y = -128.0; y < 128.0; y += 25.0)427 {428 for( float z = -128.0; z < 128.0; z += 25.0)429 {430 glColor3f(0,1,0);431 glVertex3f(-128.0,y,z);432 glVertex3f(0.0,y,z);433 glColor3f(0,0.5,0);434 glVertex3f(0.0,y,z);435 glVertex3f(128.0,y,z);436 }437 }438 for( float x = -128.0; x < 128.0; x += 25.0)439 {440 for( float z = -128.0; z < 128.0; z += 25.0)441 {442 glColor3f(0,0,1);443 glVertex3f(x,-128.0,z);444 glVertex3f(x,0.0,z);445 glColor3f(0,0,0.5);446 glVertex3f(x,0.0,z);447 glVertex3f(x,128.0,z);448 }449 450 }451 */452 /*453 glBegin(GL_LINE_STRIP);454 glColor3f(1.0, 5.0, 1.0);455 for( int i = 0; i <= 30; i++)456 {457 glEvalCoord1f ((GLfloat) i/30.0);458 }459 glEnd();460 */461 423 462 424 trackManager->drawGraph(.01); 463 425 trackManager->debug(2); 464 /*465 glBegin(GL_LINES);466 float i;467 for(i = 0.0; i<1; i+=.01)468 {469 printf("%f, %f, %f\n",tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z);470 glVertex3f(tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z);471 }472 glEnd();473 */474 426 glEndList(); 427 428 475 429 // LIGHT initialisation 476 430 light = Light::getInstance(); … … 635 589 /* draw entities */ 636 590 WorldEntity* entity; 591 glLoadIdentity(); 592 637 593 entity = this->entities->enumerate(); 638 594 while( entity != NULL ) -
orxonox/trunk/src/story_entities/world.h
r3521 r3526 57 57 58 58 private: 59 void init(char* name, int worldID); 60 59 61 Uint32 lastFrame; //!< last time of frame 60 62 bool bQuitOrxonox; //!< quit this application
Note: See TracChangeset
for help on using the changeset viewer.