WorldRenderer.h 643 B

12345678910111213141516171819202122232425
  1. #ifndef WORLDRENDERER_H
  2. #define WORLDRENDERER_H
  3. #include "client/rendering/Renderer.h"
  4. #include "common/world/World.h"
  5. #include "client/rendering/Mesh.h"
  6. #include "client/rendering/FileTexture.h"
  7. #include "client/rendering/NormalTexture.h"
  8. class WorldRenderer {
  9. public:
  10. WorldRenderer(const World& world);
  11. void render(float lag, Renderer& renderer) const;
  12. void addCube(float x, float y, float z, bool bottom, bool top, bool left, bool right, bool front, bool back);
  13. bool isAir(uint x, uint y, uint z) const;
  14. private:
  15. const World& world;
  16. Mesh mesh;
  17. FileTexture texture;
  18. NormalTexture normalTexture;
  19. };
  20. #endif