Changeset 8328 in orxonox.OLD for branches/terrain/src/world_entities/terrain_entity.h
- Timestamp:
- Jun 12, 2006, 5:17:14 PM (18 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/world_entities/terrain_entity.h
r8321 r8328 1 1 /*! 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 4 5 5 6 @todo implement it 6 7 7 The terrainshould 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. 8 9 */ 9 10 10 #ifndef _TERRAIN _H11 #define _TERRAIN _H11 #ifndef _TERRAINENTITY_H 12 #define _TERRAINENTITY_H 12 13 13 14 #include "world_entity.h" … … 15 16 16 17 // FORWARD DECLARATION 17 class SpatialSeparation;18 class HeightMap;19 18 class Material; 19 class Terrain; 20 20 21 21 //! A simple method to call a desired debug world. 22 enum DebugTerrain {TERRAIN_DAVE, TERRAIN_BENSCH};22 enum DebugTerrainEntity {TERRAINENTITY_DAVE, TERRAINENTITY_BENSCH}; 23 23 24 24 25 //! A Class to handle Terrain of orxonox26 class Terrain : public WorldEntity25 //! A Class to handle TerrainEntity of orxonox 26 class TerrainEntity : public WorldEntity 27 27 { 28 28 29 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(); 34 34 35 36 35 void init(); 36 virtual void loadParams(const TiXmlElement* root); 37 37 38 38 void loadVegetation(const std::string& vegetationFile); 39 39 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 ); 43 43 44 void buildDebugTerrain(DebugTerrain debugTerrain);44 void buildDebugTerrainEntity(DebugTerrainEntity debugTerrainEntity); 45 45 46 47 46 float getHeight(float x, float y); 47 virtual void draw() const; 48 48 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; 59 56 }; 60 57 61 #endif /* _T ERRAIN_H */58 #endif /* _TerrainEntity_H */
Note: See TracChangeset
for help on using the changeset viewer.