* Remove silly allocation of triangle per BIH node. Use temp vars instead

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8388 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..om 13 years ago
parent 0372a5ed6d
commit 30e1128a57
  1. 7
      engine/src/core/com/jme3/collision/bih/BIHNode.java

@ -66,7 +66,10 @@ public final class BIHNode implements Savable {
private float leftPlane;
private float rightPlane;
private int axis;
private Triangle tmpTriangle = new Triangle();
//Do not do this: It increases memory usage of each BIHNode by at least 56 bytes!
//
//private Triangle tmpTriangle = new Triangle();
public BIHNode(int l, int r) {
leftIndex = l;
@ -167,7 +170,7 @@ public final class BIHNode implements Savable {
stack.add(new BIHStackData(this, 0, 0));
Triangle t = tmpTriangle;
Triangle t = new Triangle();
int cols = 0;
stackloop:

Loading…
Cancel
Save