Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3566 in orxonox.OLD for orxonox/trunk/src/world_entities/terrain.cc


Ignore:
Timestamp:
Mar 15, 2005, 11:22:51 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: updated the terrain class to more functionality
view goes farther 2000 instead of 250
model gets deleted by world_entity instead of childs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/terrain.cc

    r3565 r3566  
    3232
    3333/**
     34   \brief Constructor for loading a Terrain out of a file
     35   \param fileName The file to load data from.
     36 
     37   this either loads out of an OBJ-file, or loads a heightmap if no .obj-extension is found.
     38*/
     39Terrain::Terrain(char* fileName)
     40{
     41  this->init();
     42
     43  if (strstr(fileName, ".obj") || strstr(fileName, ".OBJ"))
     44    {
     45      this->model = (OBJModel*)new OBJModel(fileName);
     46    }
     47  else
     48    {
     49      // load the hightMap here.
     50    }
     51}
     52
     53/**
    3454   \brief a Constructor for the Debug-Worlds
    3555
     
    4262}
    4363
    44 
    4564/**
    4665   \brief standard deconstructor
     
    5776{
    5877   this->setClassName ("Terrain");
     78
    5979   this->objectList = 0;
    6080}
     81
    6182
    6283
     
    7596  glMultMatrixf((float*)matrix);
    7697
    77   glCallList(objectList);
     98  if (objectList)
     99    glCallList(objectList);
     100  else if (model)
     101    model->draw();
    78102  //  this->model->draw();
    79103  glPopMatrix();
Note: See TracChangeset for help on using the changeset viewer.