Skip to content
Snippets Groups Projects
Commit 266bcb05 authored by Yoel's avatar Yoel
Browse files

Whenever a new shape is added to a group, recalculate its BoundingVolume

parent 9d277fd7
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,7 @@ util::AxisAlignedBoundingBox Group::bounds() const {
}
void Group::add(const std::shared_ptr<Shape>& shape) {
shapeList.push_back(shape);
rebuildBoundingVolume();
}
void Group::rebuildBoundingVolume() {
util::AxisAlignedBoundingBox bb = shapeList[0]->bounds();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment