started work on CompoundShape

This commit is contained in:
2026-02-04 21:17:07 +02:00
parent 5744c8b509
commit ffd2cca5c9
8 changed files with 134 additions and 39 deletions

View File

@@ -14,17 +14,21 @@ struct ShapeInfo {
class Shape {
public:
glm::vec3 pos;
glm::vec3 rotation;
glm::vec3 scale;
glm::mat4 transform;
Shape(
std::shared_ptr<Shader> shader,
ShapeInfo& shapeInfo,
glm::vec3 pos = { 0.0f, 0.0f, 0.0f }
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<float> vertices;