Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

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{
[9869]27  ObjectListDeclaration(Terrain);
[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
[4746]35  void init();
[6512]36  virtual void loadParams(const TiXmlElement* root);
[4607]37
[7221]38  void loadVegetation(const std::string& vegetationFile);
[5465]39
[7221]40  void loadHeightMap(const std::string& heightMapFile, const std::string& colorMap);
41  void loadTexture(const std::string& textureName);
[7046]42  void setScale(float x, float y, float z);
[6956]43
[3564]44  void buildDebugTerrain(DebugTerrain debugTerrain);
[7046]45
[6956]46  float getHeight(float x, float y);
[5500]47  virtual void draw() const;
[3245]48
[4919]49  public:
50    SpatialSeparation* ssp;
51
[3245]52 private:
[5465]53   Model*              vegetation;
[9869]54   int                 modelList;
[6341]55
[6956]56   HeightMap*          heightMap;
57   Material*           heightMapMaterial;
[7046]58   Vector              terrainScale;
[1853]59};
60
[3559]61#endif /* _TERRAIN_H */
Note: See TracBrowser for help on using the repository browser.