* Fix incorrect bounding box calculation when points are not centered on origin

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9706 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent be1aa87f55
commit 3c4405868a
  1. 4
      engine/src/core/com/jme3/bounding/BoundingBox.java

@ -224,8 +224,8 @@ public class BoundingBox extends BoundingVolume {
float[] tmpArray = vars.skinPositions; float[] tmpArray = vars.skinPositions;
float minX = Float.MAX_VALUE, minY = Float.MAX_VALUE, minZ = Float.MAX_VALUE; float minX = Float.POSITIVE_INFINITY, minY = Float.POSITIVE_INFINITY, minZ = Float.POSITIVE_INFINITY;
float maxX = Float.MIN_VALUE, maxY = Float.MIN_VALUE, maxZ = Float.MIN_VALUE; float maxX = Float.NEGATIVE_INFINITY, maxY = Float.NEGATIVE_INFINITY, maxZ = Float.NEGATIVE_INFINITY;
int iterations = (int) FastMath.ceil(points.limit() / ((float) tmpArray.length)); int iterations = (int) FastMath.ceil(points.limit() / ((float) tmpArray.length));
for (int i = iterations - 1; i >= 0; i--) { for (int i = iterations - 1; i >= 0; i--) {

Loading…
Cancel
Save