#pragma once #include #include #include #include "Shader.hpp" struct ShapeInfo { std::vector vertices; std::vector indices; }; class Shape { public: glm::mat4 transform; Shape( std::shared_ptr shader, ShapeInfo& shapeInfo ); ~Shape(); void init(); void draw() const; void reset_transform(); void translate(const glm::vec3& translation); void rotate(const float rotation_rad, const glm::vec3& axis); void scale(const glm::vec3& scale_amount); private: std::vector vertices; std::vector indices; unsigned int vao; unsigned int vbo; unsigned int ebo; std::shared_ptr shader; };