Mesh.h 507 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef MESH_H
  2. #define MESH_H
  3. #include <vector>
  4. #include "client/rendering/wrapper/VertexBuffer.h"
  5. class Mesh final {
  6. public:
  7. struct VertexData final {
  8. float x;
  9. float y;
  10. float z;
  11. float tx;
  12. float ty;
  13. float nx;
  14. float ny;
  15. float nz;
  16. };
  17. Mesh();
  18. void add(const VertexData& data);
  19. void clear();
  20. void build();
  21. void draw() const;
  22. private:
  23. VertexBuffer vertexBuffer;
  24. std::vector<VertexData> buffer;
  25. };
  26. #endif