Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7238 was 7221, checked in by bensch, 19 years ago

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

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