Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/terrain/src/world_entities/terrain_entity.h @ 9421

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

renamings

File size: 1.5 KB
Line 
1/*!
2 * @file TerrainEntity.h
3
4  *  Defines and handles the TerrainEntity of the World
5
6    @todo implement it
7
8    The TerrainEntity should either be build from a Model a OBJModel or from a HeightMap.
9*/
10
11#ifndef _TERRAINENTITY_H
12#define _TERRAINENTITY_H
13
14#include "world_entity.h"
15#include "vector.h"
16
17// FORWARD DECLARATION
18class Material;
19class Terrain;
20
21//! A simple method to call a desired debug world.
22enum DebugTerrainEntity {TERRAINENTITY_DAVE, TERRAINENTITY_BENSCH};
23
24
25//! A Class to handle TerrainEntity of orxonox
26class TerrainEntity : public WorldEntity
27{
28
29  public:
30    TerrainEntity(const TiXmlElement* root = NULL);
31    TerrainEntity(const std::string& fileName);
32    TerrainEntity(DebugTerrainEntity debugTerrainEntity);
33    virtual ~TerrainEntity();
34
35    void init();
36    virtual void loadParams(const TiXmlElement* root);
37
38    void loadVegetation(const std::string& vegetationFile);
39
40    void loadElevationmap( const std::string& _eleFile );
41    void loadLightmap(const std::string& _lightFile );
42    void setScale( float x, float y, float z );
43
44    void buildDebugTerrainEntity(DebugTerrainEntity debugTerrainEntity);
45
46    float getHeight(float x, float y);
47    void getAltitude( Vector& _position, Vector& _normal );
48    virtual void draw() const;
49    virtual void tick( float _dt );
50  public:
51
52  private:
53    Model*                      vegetation;
54    int                         objectList;
55    Terrain*                            terrain;
56    Vector                      TerrainEntityScale;
57};
58
59#endif /* _TerrainEntity_H */
Note: See TracBrowser for help on using the repository browser.