Procházet zdrojové kódy

* BIHTree will exit early if ray limit is lower than the farthest collision point with the model's bound

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9010 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..rd před 14 roky
rodič
revize
64d9c60142

+ 3 - 0
engine/src/core/com/jme3/collision/bih/BIHTree.java

@@ -415,6 +415,9 @@ public class BIHTree implements CollisionData {
 
             if (r.getLimit() < Float.POSITIVE_INFINITY) {
                 tMax = Math.min(tMax, r.getLimit());
+                if (tMin > tMax){
+                    return 0;
+                }
             }
 
 //            return root.intersectBrute(r, worldMatrix, this, tMin, tMax, results);