mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 19:04:32 +02:00
compute correct volume for ellipsoid
This commit is contained in:
parent
0d2cec290d
commit
4b623f72c3
1 changed files with 1 additions and 2 deletions
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue