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."
This commit is contained in:
Robert Osfield
2009-05-18 12:54:23 +00:00
parent d38fb904d3
commit 9ea43a31c6

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();
}