Changeset 6472 in orxonox.OLD for branches/height_map/src/lib/graphics/importer/height_map.h
- Timestamp:
- Jan 11, 2006, 2:11:16 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/height_map/src/lib/graphics/importer/height_map.h
r6329 r6472 16 16 #include "vertex_array_model.h" 17 17 18 #define sampleRate 4 19 #define texRate 4 20 #define texRatef 4.0f 18 19 #define texRate 4 20 #define texRatef 4.0f 21 #define tileSize 64 21 22 22 23 class SDL_Surface; … … 25 26 class PNode; 26 27 class Texture; 28 class HeightMap; 29 30 class Tile 31 { 32 public: 33 void draw(); 34 void drawHighRes(); 35 void drawLowRes(); 36 int getRes(); 37 int setHighRes(bool b); 38 Tile(int i1, int j1, int i2, int j2, HeightMap* hm ) ; 39 Tile(); 40 ~Tile(); 41 42 43 44 private: 45 VertexArrayModel* highResModel; 46 VertexArrayModel* lowResModel; 47 int highRes; 48 int lowRes; 49 void load(int i1, int j1, int i2, int i2, HeightMap* hm, VertexArrayModel* model, int Res); 50 }; 27 51 28 52 class HeightMap : public VertexArrayModel 29 53 { 30 54 public: 31 55 void draw(); 32 56 void load(); 33 57 void load(int Mode); … … 41 65 ~HeightMap(); 42 66 67 friend class Tile; 43 68 44 69 private: … … 47 72 unsigned char* heights; 48 73 unsigned char* colours; 74 49 75 void generateNormalVectorField(); 50 76 void drawRect(int xBottomLeft, int yBottomLeft, int xTopRight, int yTopRight ); 51 77 void fixBoarder(int xBottomLeft, int yBottomLeft, int xTopRight, int yTopRight); 52 78 Vector ** normalVectorField ; 79 Tile *** tiles; 53 80 Vector camCoords; 54 81 Material * tmp_mat; … … 71 98 return val; 72 99 } 73 100 inline int max(int x, int y) 101 { 102 return (x>y)? x:y; 103 } 104 inline int min(int x, int y) 105 { 106 return (x<y)? x: y; 107 } 74 108 };
Note: See TracChangeset
for help on using the changeset viewer.