Last change
on this file since 9833 was
9715,
checked in by bensch, 18 years ago
|
renamed newclassid to classid and newobjectlist to objectlist
|
File size:
1.4 KB
|
Line | |
---|
1 | /*! |
---|
2 | * @file terrain.h |
---|
3 | * Defines and handles the terrain of the World |
---|
4 | |
---|
5 | @todo implement it |
---|
6 | |
---|
7 | The terrain should either be build from a Model a OBJModel or from a HeightMap. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef _TERRAIN_H |
---|
11 | #define _TERRAIN_H |
---|
12 | |
---|
13 | #include "world_entity.h" |
---|
14 | |
---|
15 | // FORWARD DECLARATION |
---|
16 | class SpatialSeparation; |
---|
17 | class HeightMap; |
---|
18 | class Material; |
---|
19 | |
---|
20 | //! A simple method to call a desired debug world. |
---|
21 | enum DebugTerrain {TERRAIN_DAVE, TERRAIN_BENSCH}; |
---|
22 | |
---|
23 | |
---|
24 | //! A Class to handle Terrain of orxonox |
---|
25 | class Terrain : public WorldEntity |
---|
26 | { |
---|
27 | ObjectListDeclaration(Terrain); |
---|
28 | |
---|
29 | public: |
---|
30 | Terrain(const TiXmlElement* root = NULL); |
---|
31 | Terrain(const std::string& fileName); |
---|
32 | Terrain(DebugTerrain debugTerrain); |
---|
33 | virtual ~Terrain(); |
---|
34 | |
---|
35 | void init(); |
---|
36 | virtual void loadParams(const TiXmlElement* root); |
---|
37 | |
---|
38 | void loadVegetation(const std::string& vegetationFile); |
---|
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); |
---|
43 | |
---|
44 | void buildDebugTerrain(DebugTerrain debugTerrain); |
---|
45 | |
---|
46 | float getHeight(float x, float y); |
---|
47 | virtual void draw() const; |
---|
48 | |
---|
49 | public: |
---|
50 | SpatialSeparation* ssp; |
---|
51 | |
---|
52 | private: |
---|
53 | Model* vegetation; |
---|
54 | int modelList; |
---|
55 | |
---|
56 | HeightMap* heightMap; |
---|
57 | Material* heightMapMaterial; |
---|
58 | Vector terrainScale; |
---|
59 | }; |
---|
60 | |
---|
61 | #endif /* _TERRAIN_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.