#include "CompoundShape.hpp" // constructors CompoundShape::CompoundShape(const std::vector shapes) : shapes { shapes } , transform { 1.0f } { for (auto& shape : this->shapes) { shape.init(); } } // public void CompoundShape::draw() { for (auto& shape : this->shapes) { glm::mat4 orig_transform { shape.transform }; shape.transform *= shape.transform; shape.draw(); shape.transform = orig_transform; } }