Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
DemeterTerrain.h
1 //
2 // DemeterTerrain class
3 //
4 // Copyright (c) 2002-2005 Virtual Terrain Project
5 // Free for all uses, see license.txt for details.
6 //
7 
8 #ifndef DEMETERTERRAINH
9 #define DEMETERTERRAINH
10 
11 #include "DynTerrain.h"
12 namespace Demeter { class Terrain; class DemeterDrawable; }
13 
16 
24 {
25 public:
27  ~DemeterTerrain();
28 
29  // initialization
30  DTErr Init(const vtElevationGrid *pGrid, float fZScale);
31 
32  // overrides
33  void DoRender();
34  void DoCulling(const vtCamera *pCam);
35  void GetWorldLocation(int iX, int iZ, FPoint3 &p, bool bTrue = false) const;
36 
37 protected:
38  // rendering
39  void RenderSurface();
40  void RenderPass();
41  void LoadSingleMaterial();
42 
43 private:
44  Demeter::Terrain *m_pTerrain;
45  Demeter::DemeterDrawable *m_pDrawable;
46 
47  float *m_pData; // the elevation height array
48  float m_fZScale;
49 };
50  // Group dynterr
52 
53 #endif // DEMETERTERRAINH