HeightMap.h 403 B

12345678910111213141516171819202122232425262728
  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. int GetSize();
  19. void SetTexture(const std::string &file);
  20. std::vector<Vertex> vertices;
  21. };