Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/height_map_merge/src/world_entities/terrain.h @ 6495

Last change on this file since 6495 was 6495, checked in by bensch, 18 years ago

terrain updated, so it can load a new HeightMap from an XML file

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;
[6495]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();
[4607]40  void loadParams(const TiXmlElement* root);
41
[5465]42  void loadVegetation(const char* vegetationFile);
43
[6495]44  void loadHeightMap(const char* heightMapFile, const char* colorMap = NULL);
45  void loadTexture(const char* textureName);
46
[3564]47  void buildDebugTerrain(DebugTerrain debugTerrain);
[5500]48  virtual void draw() const;
[3245]49
[4919]50  public:
51    SpatialSeparation* ssp;
52
[3245]53 private:
[5465]54   Model*              vegetation;
55   int                 objectList;
[6341]56
[6495]57   HeightMap*          heightMap;
58   Material*           heightMapMaterial;
[1853]59};
60
[3559]61#endif /* _TERRAIN_H */
Note: See TracBrowser for help on using the repository browser.