Added computation of the bounding volume of osg::OccluderNodes.
Added support for osg::BoundingSphere::expandBy*(osg::BoundingBox) and have added osg::BoundingSphere/Box::valid() which deprecates isValid(), this is to be more consistent with other classes in the OSG.
This commit is contained in:
@@ -111,25 +111,9 @@ const bool Geode::computeBound() const
|
||||
bb.expandBy((*itr)->getBound());
|
||||
}
|
||||
|
||||
if (bb.isValid())
|
||||
if (bb.valid())
|
||||
{
|
||||
|
||||
_bsphere._center = bb.center();
|
||||
_bsphere._radius = 0.0f;
|
||||
|
||||
for(itr=_drawables.begin();
|
||||
itr!=_drawables.end();
|
||||
++itr)
|
||||
{
|
||||
const BoundingBox& bbox = (*itr)->getBound();
|
||||
for(unsigned int c=0;c<8;++c)
|
||||
{
|
||||
_bsphere.expandRadiusBy(bbox.corner(c));
|
||||
}
|
||||
}
|
||||
|
||||
// if (_occluder.valid()) _occluder->computeBound(_bsphere);
|
||||
|
||||
_bsphere.expandBy(bb);
|
||||
_bsphere_computed=true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user