Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7046 was 7046, checked in by patrick, 18 years ago

trunk: heightmap modified

File size: 1.5 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);
[4597]31  Terrain(const char* 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
[5465]43  void loadVegetation(const char* vegetationFile);
44
[6956]45  void loadHeightMap(const char* heightMapFile, const char* colorMap = NULL);
46  void loadTexture(const char* 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.