compute correct volume for ellipsoid

This commit is contained in:
Andrew Meadows 2016-11-03 18:05:50 -07:00
parent 0d2cec290d
commit 4b623f72c3

View file

@ -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: {