Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/terrain.old/src/world_entities/terrain_entity.h @ 8932

Last change on this file since 8932 was 8328, checked in by ponder, 18 years ago
  • 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 size: 1.3 KB
Line 
1/*!
2 * @file TerrainEntity.h
3
4  *  Defines and handles the TerrainEntity of the World
5
6    @todo implement it
7
8    The TerrainEntity should either be build from a Model a OBJModel or from a HeightMap.
9*/
10
11#ifndef _TERRAINENTITY_H
12#define _TERRAINENTITY_H
13
14#include "world_entity.h"
15#include "vector.h"
16
17// FORWARD DECLARATION
18class Material;
19class Terrain;
20
21//! A simple method to call a desired debug world.
22enum DebugTerrainEntity {TERRAINENTITY_DAVE, TERRAINENTITY_BENSCH};
23
24
25//! A Class to handle TerrainEntity of orxonox
26class TerrainEntity : public WorldEntity
27{
28
29        public:
30                TerrainEntity(const TiXmlElement* root = NULL);
31                TerrainEntity(const std::string& fileName);
32                TerrainEntity(DebugTerrainEntity debugTerrainEntity);
33                virtual ~TerrainEntity();
34
35                void init();
36                virtual void loadParams(const TiXmlElement* root);
37
38                void loadVegetation(const std::string& vegetationFile);
39
40                void loadElevationmap( const std::string& _eleFile );
41                void loadLightmap(const std::string& _lightFile );
42                void setScale( float x, float y, float z );
43
44                void buildDebugTerrainEntity(DebugTerrainEntity debugTerrainEntity);
45
46                float getHeight(float x, float y);
47                virtual void draw() const;
48
49        public:
50       
51        private:
52                 Model*                 vegetation;
53                 int                    objectList;
54                 Terrain*                               terrain;
55                 Vector                 TerrainEntityScale;
56};
57
58#endif /* _TerrainEntity_H */
Note: See TracBrowser for help on using the repository browser.