HeightMap.h 353 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <string>
  3. #include <vector>
  4. #include <GL/freeglut.h>
  5. class HeightMap
  6. {
  7. private:
  8. int height;
  9. int width;
  10. GLuint imageIndex;
  11. int scale = 1;
  12. public:
  13. HeightMap(const std::string &file);
  14. ~HeightMap();
  15. void Draw();
  16. void GetHeigth(float x, float z);
  17. void SetTexture(const std::string &file);
  18. std::vector<Vertex> vertices;
  19. };