Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 6, 2005, 6:01:06 PM (19 years ago)
Author:
nico
Message:

branches/heightMap: some makefile and include stuff fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/heightMap/src/world_entities/terrain.cc

    r4021 r4090  
    2121#include "glincl.h"
    2222
     23#include "heightmap.h"
     24
     25
    2326using namespace std;
    2427
     
    5154    {
    5255      // the heightmap case
    53       this->model = (Heightmap*)ResourceManager::getInstance()->load(fileName, BMP, RP_LEVEL);
     56      //this->model = (Heightmap*)ResourceManager::getInstance()->load(fileName, BMP, RP_LEVEL);
    5457    }
    5558  else
    5659    {
    5760      // nor .obj nor .bmp
     61    }
     62}
     63
     64/**
     65\brief Constructor for loading a heightmap out of a file
     66 \param fileName The file to load data from.
     67 \param displaylistResolution The count of vertices in a Displaylistdimension
     68 \param vertexResolution How exact the mesh should be created. 1 means every pixel defines a vertex
     69 
     70 */
     71Terrain::Terrain(char* fileName, int displaylistResolution, int vertexResolution)
     72{
     73        this->init();
     74       
     75        // here are only bmps supported!
     76        if (strstr(fileName, ".bmp") || strstr(fileName, ".BMP"))
     77    {
     78                // the heightmap case
     79                this->model = new Heightmap(fileName, 1.0, displaylistResolution, vertexResolution);
     80    }
     81        else
     82    {
     83                // nor .obj nor .bmp
    5884    }
    5985}
Note: See TracChangeset for help on using the changeset viewer.