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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user