raSystem  1.0 bata
raHoehenfeld.h
Go to the documentation of this file.
1 #pragma once
2 
3  class RAPI raHoehenfeld : public raEntity<VERTEXPOSITIONNORMALTEXTURED>
4  {
5  public:
6  raHoehenfeld(raSmartPointer<raDirectX> dx, int width, int depth, raMaterial* mat, float tileSize = 1.0f);
7  ~raHoehenfeld(void);
8 
9  virtual void SetupVertices();
10  virtual void SetupIndices();
11 
12  protected:
14  private:
15  virtual float h(float x, float z) = 0; // w = Pixel Format ( 1024 x 1024 )
16  virtual raVector3 normal(float x, float z) = 0; // Normale
17  private:
18  int m_width;
19  int m_depth;
20 
21  float m_tileSize;
22  };
23 
24  class RAPI raHeightMap : public raHoehenfeld
25  {
26  public:
27  raHeightMap(raSmartPointer<raDirectX> dx, int width, int depth, raMaterial *mat, float tileSize = 1.0f,
28  int PixelFormat = 1024,
29  LPCSTR heightTexture = "raGrafik\\Heightmap.raw",
30  LPCSTR bumpMapTexture = "raGrafik\\HeightNormals.raw");
31  ~raHeightMap();
32 
33  private:
34  virtual float h(float x, float z);
35  virtual raVector3 normal(float x, float z);
36 
37  private:
38  BYTE* m_pHeightMap;
39  BYTE* m_pBumpData;
40  int m_PixelFormat;
41  };
#define RAPI
Definition: raMain.h:11
virtual void SetupVertices()=0
virtual void SetupIndices()
Definition: raEntity.h:45