source:
orxonox.OLD/trunk/src/world_entities/terrain.h
@
  9718
        
        | Last change on this file since 9718 was 7954, checked in by patrick, 19 years ago | |
|---|---|
| File size: 1.3 KB | |
| Rev | Line | |
|---|---|---|
| [4597] | 1 | /*! | 
| [5039] | 2 | * @file terrain.h | 
| [4836] | 3 | * Defines and handles the terrain of the World | 
| [3329] | 4 | |
| [4836] | 5 | @todo implement it | 
| [3559] | 6 | |
| 7 | The terrain should either be build from a Model a OBJModel or from a HeightMap. | |
| [3245] | 8 | */ | 
| [1853] | 9 | |
| [3559] | 10 | #ifndef _TERRAIN_H | 
| 11 | #define _TERRAIN_H | |
| [1853] | 12 | |
| [3559] | 13 | #include "world_entity.h" | 
| [7046] | 14 | #include "vector.h" | 
| [1853] | 15 | |
| [5405] | 16 | // FORWARD DECLARATION | 
| [4889] | 17 | class SpatialSeparation; | 
| [6956] | 18 | class HeightMap; | 
| 19 | class Material; | |
| [3543] | 20 | |
| [3564] | 21 | //! A simple method to call a desired debug world. | 
| 22 | enum DebugTerrain {TERRAIN_DAVE, TERRAIN_BENSCH}; | |
| 23 | ||
| 24 | ||
| [3559] | 25 | //! A Class to handle Terrain of orxonox | 
| [4597] | 26 | class Terrain : public WorldEntity | 
| [3559] | 27 | { | 
| [3543] | 28 | |
| [1904] | 29 | public: | 
| [4607] | 30 | Terrain(const TiXmlElement* root = NULL); | 
| [7221] | 31 | Terrain(const std::string& fileName); | 
| [3564] | 32 | Terrain(DebugTerrain debugTerrain); | 
| [4746] | 33 | virtual ~Terrain(); | 
| [4597] | 34 | |
| [4746] | 35 | void init(); | 
| [6512] | 36 | virtual void loadParams(const TiXmlElement* root); | 
| [4607] | 37 | |
| [7221] | 38 | void loadVegetation(const std::string& vegetationFile); | 
| [5465] | 39 | |
| [7221] | 40 | void loadHeightMap(const std::string& heightMapFile, const std::string& colorMap); | 
| 41 | void loadTexture(const std::string& textureName); | |
| [7046] | 42 | void setScale(float x, float y, float z); | 
| [6956] | 43 | |
| [3564] | 44 | void buildDebugTerrain(DebugTerrain debugTerrain); | 
| [7046] | 45 | |
| [6956] | 46 | float getHeight(float x, float y); | 
| [5500] | 47 | virtual void draw() const; | 
| [3245] | 48 | |
| [4919] | 49 | public: | 
| 50 | SpatialSeparation* ssp; | |
| 51 | ||
| [3245] | 52 | private: | 
| [5465] | 53 | Model* vegetation; | 
| 54 | int objectList; | |
| [6341] | 55 | |
| [6956] | 56 | HeightMap* heightMap; | 
| 57 | Material* heightMapMaterial; | |
| [7046] | 58 | Vector terrainScale; | 
| [1853] | 59 | }; | 
| 60 | ||
| [3559] | 61 | #endif /* _TERRAIN_H */ | 
Note: See TracBrowser
        for help on using the repository browser.
    


 
            







