Skip to content

Commit

Permalink
BUG: clone convex shapes to avoid double transformations
Browse files Browse the repository at this point in the history
Scaling, rotations and translations might be done twice to the same
convex shapes if the same object is referenced in several convex shapes.
  • Loading branch information
Simon Rit committed Feb 23, 2022
1 parent 9a386c5 commit 6d73ac0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/rtkIntersectionOfConvexShapes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ IntersectionOfConvexShapes ::IntersectionOfConvexShapes() = default;
void
IntersectionOfConvexShapes ::SetConvexShapes(const ConvexShapeVector & _arg)
{
if (this->m_ConvexShapes != _arg)
{
this->m_ConvexShapes = _arg;
this->Modified();
}
m_ConvexShapes.clear();
for (auto & convexShape : _arg)
this->AddConvexShape(convexShape);
this->Modified();
}

bool
Expand Down

0 comments on commit 6d73ac0

Please sign in to comment.