From Ross Anderson, "Symptom: The computation of TerrainTiles containing only image layers (no elevation layer) is incorrect. The resulting bounding sphere will always have a radius of zero.

The fix is to remove the call to bs.expandBy(v) and compute the radius directly. I believe this call was intended to be bs.expandRadiusBy(v), but it is superfluous when the radius is computed directly.
"

Merged from svn/trunk using:

   svn merge -r 10229:10230 http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgTerrain
This commit is contained in:
Robert Osfield
2009-05-18 12:56:29 +00:00
parent 371778e0e7
commit d4ec341573

View File

@@ -117,8 +117,6 @@ osg::BoundingSphere Layer::computeBound(bool treatAsElevationLayer) const
if (getLocator()->convertLocalToModel(osg::Vec3d(0.0,0.0,0.0), v))
{
bs.expandBy(v);
bs.radius() = (bs.center() - v).length();
}