From 4b623f72c3a1f2a950de505b9a0477c6f97d6efd Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Thu, 3 Nov 2016 18:05:50 -0700 Subject: [PATCH] compute correct volume for ellipsoid --- libraries/shared/src/ShapeInfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/shared/src/ShapeInfo.cpp b/libraries/shared/src/ShapeInfo.cpp index 1dc0753b8d..b8ea3a4272 100644 --- a/libraries/shared/src/ShapeInfo.cpp +++ b/libraries/shared/src/ShapeInfo.cpp @@ -114,8 +114,7 @@ float ShapeInfo::computeVolume() const { break; } case SHAPE_TYPE_SPHERE: { - float radius = _halfExtents.x; - volume = 4.0f * PI * radius * radius * radius / 3.0f; + volume = 4.0f * PI * _halfExtents.x * _halfExtents.y * _halfExtents.z / 3.0f; break; } case SHAPE_TYPE_CYLINDER_Y: {