Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 12, 2006, 5:17:14 PM (18 years ago)
Author:
ponder
Message:
  • Renamed Terrain into TerrainEntity in order to avoid conflicts between the importer/terrain class and the world_entities/terrain.
  • Changed TerrainEntity to support the new terrain class.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/terrain/src/world_entities/terrain_entity.h

    r8321 r8328  
    11/*!
    2  * @file terrain.h
    3   *  Defines and handles the terrain of the World
     2 * @file TerrainEntity.h
     3
     4  *  Defines and handles the TerrainEntity of the World
    45
    56    @todo implement it
    67
    7     The terrain should either be build from a Model a OBJModel or from a HeightMap.
     8    The TerrainEntity should either be build from a Model a OBJModel or from a HeightMap.
    89*/
    910
    10 #ifndef _TERRAIN_H
    11 #define _TERRAIN_H
     11#ifndef _TERRAINENTITY_H
     12#define _TERRAINENTITY_H
    1213
    1314#include "world_entity.h"
     
    1516
    1617// FORWARD DECLARATION
    17 class SpatialSeparation;
    18 class HeightMap;
    1918class Material;
     19class Terrain;
    2020
    2121//! A simple method to call a desired debug world.
    22 enum DebugTerrain {TERRAIN_DAVE, TERRAIN_BENSCH};
     22enum DebugTerrainEntity {TERRAINENTITY_DAVE, TERRAINENTITY_BENSCH};
    2323
    2424
    25 //! A Class to handle Terrain of orxonox
    26 class Terrain : public WorldEntity
     25//! A Class to handle TerrainEntity of orxonox
     26class TerrainEntity : public WorldEntity
    2727{
    2828
    29  public:
    30   Terrain(const TiXmlElement* root = NULL);
    31   Terrain(const std::string& fileName);
    32   Terrain(DebugTerrain debugTerrain);
    33   virtual ~Terrain();
     29        public:
     30                TerrainEntity(const TiXmlElement* root = NULL);
     31                TerrainEntity(const std::string& fileName);
     32                TerrainEntity(DebugTerrainEntity debugTerrainEntity);
     33                virtual ~TerrainEntity();
    3434
    35   void init();
    36   virtual void loadParams(const TiXmlElement* root);
     35                void init();
     36                virtual void loadParams(const TiXmlElement* root);
    3737
    38   void loadVegetation(const std::string& vegetationFile);
     38                void loadVegetation(const std::string& vegetationFile);
    3939
    40   void loadHeightMap(const std::string& heightMapFile, const std::string& colorMap);
    41   void loadTexture(const std::string& textureName);
    42   void setScale(float x, float y, float z);
     40                void loadElevationmap( const std::string& _eleFile );
     41                void loadLightmap(const std::string& _lightFile );
     42                void setScale( float x, float y, float z );
    4343
    44   void buildDebugTerrain(DebugTerrain debugTerrain);
     44                void buildDebugTerrainEntity(DebugTerrainEntity debugTerrainEntity);
    4545
    46   float getHeight(float x, float y);
    47   virtual void draw() const;
     46                float getHeight(float x, float y);
     47                virtual void draw() const;
    4848
    49   public:
    50     SpatialSeparation* ssp;
    51 
    52  private:
    53    Model*              vegetation;
    54    int                 objectList;
    55 
    56    HeightMap*          heightMap;
    57    Material*           heightMapMaterial;
    58    Vector              terrainScale;
     49        public:
     50       
     51        private:
     52                 Model*                 vegetation;
     53                 int                    objectList;
     54                 Terrain*                               terrain;
     55                 Vector                 TerrainEntityScale;
    5956};
    6057
    61 #endif /* _TERRAIN_H */
     58#endif /* _TerrainEntity_H */
Note: See TracChangeset for help on using the changeset viewer.