Changeset 6227 in orxonox.OLD for branches/height_map/src/lib/graphics/importer/height_map.h
- Timestamp:
- Dec 21, 2005, 2:22:59 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/height_map/src/lib/graphics/importer/height_map.h
r6100 r6227 14 14 15 15 16 #include "static_model.h" 16 #include "model.h" 17 18 #define sampleRate 2 17 19 18 20 class SDL_Surface; 19 21 class Vector; 22 class Material; 23 class PNode; 24 class Texture; 20 25 21 class HeightMap : public StaticModel26 class HeightMap : public Model 22 27 { 23 28 public: 29 void draw(); 24 30 void load(); 25 void load(const char*, int); 31 void load(int Mode); 32 void load(const char*, int Mode); 33 void scale( Vector V); 34 float getHeight(float x, float y); // x,y relative to HeightMap 26 35 HeightMap(); 27 36 HeightMap(const char*); 37 HeightMap(const char*, const char*); 28 38 ~HeightMap(); 39 29 40 30 41 private: 31 42 SDL_Surface* heightMap; 43 SDL_Surface* colourMap; 44 unsigned char* heights; 45 unsigned char* colours; 46 void generateNormalVectorField(); 47 void drawRect(int xBottomLeft, int yBottomLeft, int xTopRight, int yTopRight ); 48 void fixBoarder(int xBottomLeft, int yBottomLeft, int xTopRight, int yTopRight); 49 Vector ** normalVectorField ; 50 Vector camCoords; 51 Material * tmp_mat; 52 Material* red_mat; 53 Texture* texture; 54 const PNode* camera; 55 float scaleX ; 56 float scaleY ; 57 float scaleZ ; 58 int cmScaleX; 59 int cmScaleY; 60 bool hasColourMap; 61 inline int abs(int val) 62 { 63 if(val < 0) val = -val; 64 return val; 65 } 32 66 33 67 };
Note: See TracChangeset
for help on using the changeset viewer.