Rev | Line | |
---|
[4597] | 1 | /*! |
---|
[8328] | 2 | * @file TerrainEntity.h |
---|
[3329] | 3 | |
---|
[8328] | 4 | * Defines and handles the TerrainEntity of the World |
---|
| 5 | |
---|
[4836] | 6 | @todo implement it |
---|
[3559] | 7 | |
---|
[8328] | 8 | The TerrainEntity should either be build from a Model a OBJModel or from a HeightMap. |
---|
[3245] | 9 | */ |
---|
[1853] | 10 | |
---|
[8328] | 11 | #ifndef _TERRAINENTITY_H |
---|
| 12 | #define _TERRAINENTITY_H |
---|
[1853] | 13 | |
---|
[3559] | 14 | #include "world_entity.h" |
---|
[7046] | 15 | #include "vector.h" |
---|
[1853] | 16 | |
---|
[5405] | 17 | // FORWARD DECLARATION |
---|
[6956] | 18 | class Material; |
---|
[8328] | 19 | class Terrain; |
---|
[3543] | 20 | |
---|
[3564] | 21 | //! A simple method to call a desired debug world. |
---|
[8328] | 22 | enum DebugTerrainEntity {TERRAINENTITY_DAVE, TERRAINENTITY_BENSCH}; |
---|
[3564] | 23 | |
---|
| 24 | |
---|
[8328] | 25 | //! A Class to handle TerrainEntity of orxonox |
---|
| 26 | class TerrainEntity : public WorldEntity |
---|
[3559] | 27 | { |
---|
[3543] | 28 | |
---|
[9421] | 29 | public: |
---|
| 30 | TerrainEntity(const TiXmlElement* root = NULL); |
---|
| 31 | TerrainEntity(const std::string& fileName); |
---|
| 32 | TerrainEntity(DebugTerrainEntity debugTerrainEntity); |
---|
| 33 | virtual ~TerrainEntity(); |
---|
[4597] | 34 | |
---|
[9421] | 35 | void init(); |
---|
| 36 | virtual void loadParams(const TiXmlElement* root); |
---|
[4607] | 37 | |
---|
[9421] | 38 | void loadVegetation(const std::string& vegetationFile); |
---|
[5465] | 39 | |
---|
[9421] | 40 | void loadElevationmap( const std::string& _eleFile ); |
---|
| 41 | void loadLightmap(const std::string& _lightFile ); |
---|
| 42 | void setScale( float x, float y, float z ); |
---|
[6956] | 43 | |
---|
[9421] | 44 | void buildDebugTerrainEntity(DebugTerrainEntity debugTerrainEntity); |
---|
[7046] | 45 | |
---|
[9421] | 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; |
---|
[1853] | 57 | }; |
---|
| 58 | |
---|
[8328] | 59 | #endif /* _TerrainEntity_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.