- Used TempVars for transform calculation in getOffsetTransform

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7170 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 14 years ago
parent 70c1db322f
commit c63c4a3e2b
  1. 7
      engine/src/core/com/jme3/animation/Bone.java

@ -93,8 +93,6 @@ public final class Bone implements Savable {
private Quaternion worldRot = new Quaternion(); private Quaternion worldRot = new Quaternion();
private Vector3f worldScale = new Vector3f(); private Vector3f worldScale = new Vector3f();
// TODO: Get rid of this temp variable
private Matrix3f rotMat = new Matrix3f();
/** /**
* Creates a new bone with the given name. * Creates a new bone with the given name.
@ -343,7 +341,12 @@ public final class Bone implements Savable {
//populating the matrix //populating the matrix
m.loadIdentity(); m.loadIdentity();
TempVars vars = TempVars.get();
assert vars.lock();
Matrix3f rotMat = vars.tempMat3;
m.setTransform(translate, scale, rotate.toRotationMatrix(rotMat)); m.setTransform(translate, scale, rotate.toRotationMatrix(rotMat));
assert vars.unlock();
} }
/** /**

Loading…
Cancel
Save