From 1ec93f9cce8d342ad27ec0d3210f91a6143249cf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 31 Jan 2004 20:45:40 +0000 Subject: [PATCH] Fixed HeightField compute bounding box implementation. --- src/osg/ShapeDrawable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osg/ShapeDrawable.cpp b/src/osg/ShapeDrawable.cpp index 51706f3d4..d8640806c 100644 --- a/src/osg/ShapeDrawable.cpp +++ b/src/osg/ShapeDrawable.cpp @@ -910,8 +910,8 @@ void ComputeBoundShapeVisitor::apply(const HeightField& field) } else { - float x = field.getXInterval()*field.getNumColumns(); - float y = field.getYInterval()*field.getNumRows(); + float x = field.getXInterval()*(field.getNumColumns()-1); + float y = field.getYInterval()*(field.getNumRows()-1); Vec3 base_1(Vec3(0,0,zMin)); Vec3 base_2(Vec3(x,0,zMin));