Commit 05bdc568 authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

BUG: Fix Scene::computeBoundingBox for empty scene

parent b425d9ca
......@@ -100,6 +100,13 @@ Scene::initialize()
void
Scene::computeBoundingBox(Vec3d& lowerCorner, Vec3d& upperCorner, const double paddingPercent)
{
if (this->getSceneObjects().size() == 0)
{
lowerCorner = Vec3d(0., 0., 0.);
upperCorner = Vec3d(0., 0., 0.);
return;
}
lowerCorner = Vec3d(IMSTK_DOUBLE_MAX, IMSTK_DOUBLE_MAX, IMSTK_DOUBLE_MAX);
upperCorner = Vec3d(IMSTK_DOUBLE_MIN, IMSTK_DOUBLE_MIN, IMSTK_DOUBLE_MIN);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment