From 9ea43a31c6a6d269f1a67217c3d4ac6845390536 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 18 May 2009 12:54:23 +0000 Subject: [PATCH] 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." --- src/osgTerrain/Layer.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/osgTerrain/Layer.cpp b/src/osgTerrain/Layer.cpp index c96260bd8..40597cff9 100644 --- a/src/osgTerrain/Layer.cpp +++ b/src/osgTerrain/Layer.cpp @@ -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(); }