/*! * @file terrain.h * Defines and handles the terrain of the World @todo implement it The terrain should either be build from a Model a OBJModel or from a HeightMap. */ #ifndef _TERRAIN_H #define _TERRAIN_H #include "world_entity.h" // FORWARD DECLARATION class SpatialSeparation; class HeightMap; class Material; //! A simple method to call a desired debug world. enum DebugTerrain {TERRAIN_DAVE, TERRAIN_BENSCH}; //! A Class to handle Terrain of orxonox class Terrain : public WorldEntity { public: Terrain(const TiXmlElement* root = NULL); Terrain(const char* fileName); Terrain(DebugTerrain debugTerrain); virtual ~Terrain(); virtual int writeBytes(const byte* data, int length, int sender); virtual int readBytes(byte* data, int maxLength, int * reciever); virtual void writeDebug() const; virtual void readDebug() const; void init(); virtual void loadParams(const TiXmlElement* root); void loadVegetation(const char* vegetationFile); void loadHeightMap(const char* heightMapFile, const char* colorMap = NULL); void loadTexture(const char* textureName); void buildDebugTerrain(DebugTerrain debugTerrain); float getHeight(float x, float y); virtual void draw() const; public: SpatialSeparation* ssp; private: Model* vegetation; int objectList; HeightMap* heightMap; Material* heightMapMaterial; }; #endif /* _TERRAIN_H */