- Used TempVars for transform calculation in getOffsetTransform
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7170 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
70c1db322f
commit
c63c4a3e2b
@ -93,8 +93,6 @@ public final class Bone implements Savable {
|
||||
private Quaternion worldRot = new Quaternion();
|
||||
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.
|
||||
@ -343,7 +341,12 @@ public final class Bone implements Savable {
|
||||
|
||||
//populating the matrix
|
||||
m.loadIdentity();
|
||||
TempVars vars = TempVars.get();
|
||||
assert vars.lock();
|
||||
Matrix3f rotMat = vars.tempMat3;
|
||||
m.setTransform(translate, scale, rotate.toRotationMatrix(rotMat));
|
||||
|
||||
assert vars.unlock();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user