Skip to content
Snippets Groups Projects
Commit 35693c88 authored by Andre Meixner's avatar Andre Meixner :camera:
Browse files

fixed an error in cloning primitive shapes

parent 39ad2817
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,9 @@ namespace VirtualRobot
std::unique_ptr<Primitive> clone() const final
{
return std::make_unique<Box>(width, height, depth);
auto clone = std::make_unique<Box>(width, height, depth);
clone->transform = transform;
return clone;
}
};
......@@ -58,7 +60,9 @@ namespace VirtualRobot
std::unique_ptr<Primitive> clone() const final
{
return std::make_unique<Sphere>(radius);
auto clone = std::make_unique<Sphere>(radius);
clone->transform = transform;
return clone;
}
};
......@@ -74,7 +78,9 @@ namespace VirtualRobot
std::unique_ptr<Primitive> clone() const final
{
return std::make_unique<Cylinder>(radius, height);
auto clone = std::make_unique<Cylinder>(radius, height);
clone->transform = transform;
return clone;
}
};
......@@ -93,7 +99,9 @@ namespace VirtualRobot
std::unique_ptr<Primitive> clone() const final
{
return std::make_unique<Capsule>(radius, height);
auto clone = std::make_unique<Capsule>(radius, height);
clone->transform = transform;
return clone;
}
};
......
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