HeightMap.h 375 B

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