From 3c4405868adcf5bb8d43be358a9345ecf30721e4 Mon Sep 17 00:00:00 2001 From: "Sha..rd" Date: Thu, 6 Sep 2012 03:51:46 +0000 Subject: [PATCH] * 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 --- engine/src/core/com/jme3/bounding/BoundingBox.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/core/com/jme3/bounding/BoundingBox.java b/engine/src/core/com/jme3/bounding/BoundingBox.java index 8b8858cd0..c8779a6d3 100644 --- a/engine/src/core/com/jme3/bounding/BoundingBox.java +++ b/engine/src/core/com/jme3/bounding/BoundingBox.java @@ -224,8 +224,8 @@ public class BoundingBox extends BoundingVolume { float[] tmpArray = vars.skinPositions; - float minX = Float.MAX_VALUE, minY = Float.MAX_VALUE, minZ = Float.MAX_VALUE; - float maxX = Float.MIN_VALUE, maxY = Float.MIN_VALUE, maxZ = Float.MIN_VALUE; + float minX = Float.POSITIVE_INFINITY, minY = Float.POSITIVE_INFINITY, minZ = Float.POSITIVE_INFINITY; + float maxX = Float.NEGATIVE_INFINITY, maxY = Float.NEGATIVE_INFINITY, maxZ = Float.NEGATIVE_INFINITY; int iterations = (int) FastMath.ceil(points.limit() / ((float) tmpArray.length)); for (int i = iterations - 1; i >= 0; i--) {