Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/terrain.h @ 6958

Last change on this file since 6958 was 6956, checked in by bensch, 19 years ago

orxonox/trunk: merged the HeightMapBranche back to the trunk

File size: 1.4 KB
RevLine 
[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"
[1853]14
[5405]15// FORWARD DECLARATION
[4889]16class SpatialSeparation;
[6956]17class HeightMap;
18class Material;
[3543]19
[3564]20//! A simple method to call a desired debug world.
21enum DebugTerrain {TERRAIN_DAVE, TERRAIN_BENSCH};
22
23
[3559]24//! A Class to handle Terrain of orxonox
[4597]25class Terrain : public WorldEntity
[3559]26{
[3543]27
[1904]28 public:
[4607]29  Terrain(const TiXmlElement* root = NULL);
[4597]30  Terrain(const char* fileName);
[3564]31  Terrain(DebugTerrain debugTerrain);
[4746]32  virtual ~Terrain();
[4597]33
[6341]34  virtual int       writeBytes(const byte* data, int length, int sender);
35  virtual int       readBytes(byte* data, int maxLength, int * reciever);
36  virtual void      writeDebug() const;
37  virtual void      readDebug() const;
38
[4746]39  void init();
[6512]40  virtual void loadParams(const TiXmlElement* root);
[4607]41
[5465]42  void loadVegetation(const char* vegetationFile);
43
[6956]44  void loadHeightMap(const char* heightMapFile, const char* colorMap = NULL);
45  void loadTexture(const char* textureName);
46
[3564]47  void buildDebugTerrain(DebugTerrain debugTerrain);
[6956]48 
49  float getHeight(float x, float y);
[5500]50  virtual void draw() const;
[3245]51
[4919]52  public:
53    SpatialSeparation* ssp;
54
[3245]55 private:
[5465]56   Model*              vegetation;
57   int                 objectList;
[6341]58
[6956]59   HeightMap*          heightMap;
60   Material*           heightMapMaterial;
[1853]61};
62
[3559]63#endif /* _TERRAIN_H */
Note: See TracBrowser for help on using the repository browser.