Further work on Bound class/Node::getBound() and Drawable::getBound() and usage in OSG codebase
This commit is contained in:
@@ -196,7 +196,10 @@ BoundingSphere Switch::computeBound() const
|
||||
if (!transform || transform->getReferenceFrame()==osg::Transform::RELATIVE_RF)
|
||||
{
|
||||
if( _values[pos] == true )
|
||||
bb.expandBy(_children[pos]->getBound());
|
||||
{
|
||||
const osg::BoundingSphere& bs = _children[pos]->getBound();
|
||||
bb.expandBy(bs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,7 +216,10 @@ BoundingSphere Switch::computeBound() const
|
||||
if (!transform || transform->getReferenceFrame()==osg::Transform::RELATIVE_RF)
|
||||
{
|
||||
if( _values[pos] == true )
|
||||
bsphere.expandRadiusBy(static_cast<const BoundingSphere&>(_children[pos]->getBound()));
|
||||
{
|
||||
const osg::BoundingSphere& bs = _children[pos]->getBound();
|
||||
bsphere.expandRadiusBy(bs);
|
||||
}
|
||||
}
|
||||
}
|
||||
return bsphere;
|
||||
|
||||
Reference in New Issue
Block a user