* Proper TempVars lock/unlock usage in SkeletonControl ... Although it shouldn't really break anything since that class is the only one using the skinning arrays.
* Deprecated Transform.Identity since it does not follow conventions. Added IDENTITY to replace it. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7168 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
2611139702
commit
636339a432
@ -119,6 +119,8 @@ public class SkeletonControl extends AbstractControl implements Savable, Cloneab
|
||||
int idxWeights = 0;
|
||||
|
||||
TempVars vars = TempVars.get();
|
||||
assert vars.lock();
|
||||
|
||||
float[] posBuf = vars.skinPositions;
|
||||
float[] normBuf = vars.skinNormals;
|
||||
|
||||
@ -173,6 +175,8 @@ public class SkeletonControl extends AbstractControl implements Savable, Cloneab
|
||||
fnb.position(fnb.position() - bufLength);
|
||||
fnb.put(normBuf, 0, bufLength);
|
||||
}
|
||||
|
||||
assert vars.unlock();
|
||||
|
||||
vb.updateData(fvb);
|
||||
nb.updateData(fnb);
|
||||
|
@ -48,7 +48,15 @@ import java.io.IOException;
|
||||
*/
|
||||
public final class Transform implements Savable, Cloneable {
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated To follow with the standard for constants,
|
||||
* which should be all upper case. Use {@link Transform#IDENTITY} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static final Transform Identity = new Transform();
|
||||
|
||||
public static final Transform IDENTITY = new Transform();
|
||||
|
||||
private Quaternion rot = new Quaternion();
|
||||
private Vector3f translation = new Vector3f();
|
||||
@ -281,8 +289,8 @@ public final class Transform implements Savable, Cloneable {
|
||||
InputCapsule capsule = e.getCapsule(this);
|
||||
|
||||
rot = (Quaternion)capsule.readSavable("rot", new Quaternion());
|
||||
translation = (Vector3f)capsule.readSavable("translation", Vector3f.ZERO.clone());
|
||||
scale = (Vector3f)capsule.readSavable("scale", Vector3f.UNIT_XYZ.clone());
|
||||
translation = (Vector3f)capsule.readSavable("translation", Vector3f.ZERO);
|
||||
scale = (Vector3f)capsule.readSavable("scale", Vector3f.UNIT_XYZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1229,7 +1229,7 @@ public abstract class Spatial implements Savable, Cloneable, Collidable {
|
||||
shadowMode = ic.readEnum("shadow_mode", ShadowMode.class,
|
||||
ShadowMode.Inherit);
|
||||
|
||||
localTransform = (Transform) ic.readSavable("transform", Transform.Identity);
|
||||
localTransform = (Transform) ic.readSavable("transform", Transform.IDENTITY);
|
||||
|
||||
localLights = (LightList) ic.readSavable("lights", null);
|
||||
localLights.setOwner(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user