Fixed the bounding sphere computation and handling of Drawable as the root of the scene graph
This commit is contained in:
parent
74f91037a7
commit
afcf54b108
@ -157,6 +157,8 @@ class OSG_EXPORT Drawable : public Node
|
|||||||
|
|
||||||
_boundingSphereComputed = true;
|
_boundingSphereComputed = true;
|
||||||
}
|
}
|
||||||
|
_boundingSphere.set(_boundingBox.center(), _boundingBox.radius());
|
||||||
|
|
||||||
return _boundingBox;
|
return _boundingBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -989,10 +989,7 @@ void CullVisitor::apply(osg::Drawable& drawable)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//else
|
if (!getNodePath().empty() && getNodePath().back()->isCullingActive() && isCulled(bb)) return;
|
||||||
{
|
|
||||||
if (getNodePath().back()->isCullingActive() && isCulled(bb)) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (_computeNearFar && bb.valid())
|
if (_computeNearFar && bb.valid())
|
||||||
|
Loading…
Reference in New Issue
Block a user