Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/world_entities/terrain.h @ 7917

Last change on this file since 7917 was 7444, checked in by rennerc, 19 years ago

new network system implemented. yet with a lot of empty function bodys

File size: 1.3 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#include "vector.h"
15
16// FORWARD DECLARATION
17class SpatialSeparation;
18class HeightMap;
19class Material;
20
21//! A simple method to call a desired debug world.
22enum DebugTerrain {TERRAIN_DAVE, TERRAIN_BENSCH};
23
24
25//! A Class to handle Terrain of orxonox
26class Terrain : public WorldEntity
27{
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                 objectList;
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.