WorldRenderer.h 566 B

1234567891011121314151617181920212223
  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. class WorldRenderer {
  8. public:
  9. WorldRenderer(const World& world);
  10. void render(float lag, Renderer& renderer) const;
  11. void addCube(float x, float y, float z, bool bottom, bool top, bool left, bool right, bool front, bool back);
  12. bool isAir(uint x, uint y, uint z) const;
  13. private:
  14. const World& world;
  15. Mesh mesh;
  16. FileTexture texture;
  17. };
  18. #endif