|
|
|
@ -68,7 +68,7 @@ public class BIHTree implements CollisionData { |
|
|
|
|
private float[] pointData; |
|
|
|
|
private int[] triIndices; |
|
|
|
|
|
|
|
|
|
private transient CollisionResults boundResults = new CollisionResults(); |
|
|
|
|
// private transient CollisionResults boundResults = new CollisionResults();
|
|
|
|
|
private transient float[] bihSwapTmp; |
|
|
|
|
|
|
|
|
|
private static final TriangleAxisComparator[] comparators = new TriangleAxisComparator[] |
|
|
|
@ -398,6 +398,9 @@ public class BIHTree implements CollisionData { |
|
|
|
|
BoundingVolume worldBound, |
|
|
|
|
CollisionResults results) { |
|
|
|
|
|
|
|
|
|
TempVars vars = TempVars.get(); |
|
|
|
|
try { |
|
|
|
|
CollisionResults boundResults = vars.collisionResults; |
|
|
|
|
boundResults.clear(); |
|
|
|
|
worldBound.collideWith(r, boundResults); |
|
|
|
|
if (boundResults.size() > 0) { |
|
|
|
@ -421,10 +424,13 @@ public class BIHTree implements CollisionData { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// return root.intersectBrute(r, worldMatrix, this, tMin, tMax, results);
|
|
|
|
|
// return root.intersectBrute(r, worldMatrix, this, tMin, tMax, results);
|
|
|
|
|
return root.intersectWhere(r, worldMatrix, this, tMin, tMax, results); |
|
|
|
|
} |
|
|
|
|
return 0; |
|
|
|
|
} finally { |
|
|
|
|
vars.release(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private int collideWithBoundingVolume(BoundingVolume bv, |
|
|
|
|