diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-13 00:14:42 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-13 00:14:42 +0200 |
commit | 712154bc4fcfb50c05c57a875e3b2affdc5e2b1b (patch) | |
tree | 9b13ef9f64cf272a8c67effdb62c2459306bd167 /src/graphics/engine/terrain.h | |
parent | 146ad47e4afbf1fe82763c94c2cd2209285f869f (diff) | |
download | colobot-712154bc4fcfb50c05c57a875e3b2affdc5e2b1b.tar.gz colobot-712154bc4fcfb50c05c57a875e3b2affdc5e2b1b.tar.bz2 colobot-712154bc4fcfb50c05c57a875e3b2affdc5e2b1b.zip |
Rendering functions, documentation
- rewrote the render functions for CEngine, CCloud and CWater
- added documentation
Diffstat (limited to 'src/graphics/engine/terrain.h')
-rw-r--r-- | src/graphics/engine/terrain.h | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/src/graphics/engine/terrain.h b/src/graphics/engine/terrain.h index 0c7e3cf..24bd1f9 100644 --- a/src/graphics/engine/terrain.h +++ b/src/graphics/engine/terrain.h @@ -34,19 +34,31 @@ class CEngine; class CWater; +//! Limit of slope considered a flat piece of land const short FLATLIMIT = (5.0f*Math::PI/180.0f); +/** + * \enum TerrainRes + * \brief Underground resource type + */ enum TerrainRes { - TR_NULL = 0, - TR_STONE = 1, - TR_URANIUM = 2, - TR_POWER = 3, + //! No resource + TR_NULL = 0, + //! Titanium + TR_STONE = 1, + //! Uranium + TR_URANIUM = 2, + //! Energy + TR_POWER = 3, + //! Vault keys + //@{ TR_KEY_A = 4, TR_KEY_B = 5, TR_KEY_C = 6, - TR_KEY_D = 7, + TR_KEY_D = 7 + //@} }; struct BuildingLevel @@ -98,6 +110,10 @@ struct DotLevel } }; +/** + * \struct FlyingLimit + * \brief Spherical limit of flight + */ struct FlyingLimit { Math::Vector center; @@ -112,7 +128,22 @@ struct FlyingLimit }; - +/** + * \class CTerrain + * \brief Terrain loader/generator and manager + * + * Terrain is created from relief textures specifying a XY plane with height + * values which are then scaled and translated into XZ surface forming the + * terrain of game level. + * + * The class also facilitates creating and searching for flat space expanses + * for construction of buildings. + * + * The terrain also specifies underground resources loaded from texture + * and flying limits for the player. + * + * ... + */ class CTerrain { public: |