HeightMap.h 387 B

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