* Made Bone.getAttachmentsNode() private, instead the method in AnimControl should be used

* Lights do not have names because they are not part of the scene graph
 * Fixed compiler warnings with IntMap iteration

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7166 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..rd 14 years ago
parent 8858ccf2ef
commit 548eb26428
  1. 11
      engine/src/core/com/jme3/animation/Bone.java
  2. 1
      engine/src/core/com/jme3/animation/BoneTrack.java
  3. 18
      engine/src/core/com/jme3/light/Light.java
  4. 8
      engine/src/core/com/jme3/util/IntMap.java

@ -72,7 +72,7 @@ public final class Bone implements Savable {
*/ */
private Vector3f initialPos; private Vector3f initialPos;
private Quaternion initialRot; private Quaternion initialRot;
private Vector3f initialScale = new Vector3f(1.0f, 1.0f, 1.0f); private Vector3f initialScale;
/** /**
* The inverse world bind transform. * The inverse world bind transform.
* BONE SPACE -> MODEL SPACE * BONE SPACE -> MODEL SPACE
@ -93,6 +93,9 @@ 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.
* *
@ -103,7 +106,7 @@ public final class Bone implements Savable {
initialPos = new Vector3f(); initialPos = new Vector3f();
initialRot = new Quaternion(); initialRot = new Quaternion();
initialScale = new Vector3f(); initialScale = new Vector3f(1,1,1);
worldBindInversePos = new Vector3f(); worldBindInversePos = new Vector3f();
worldBindInverseRot = new Quaternion(); worldBindInverseRot = new Quaternion();
@ -321,8 +324,6 @@ public final class Bone implements Savable {
} }
} }
//Temp 3x3 rotation matrix for transform computation
Matrix3f rotMat=new Matrix3f();
/** /**
* Stores the skinning transform in the specified Matrix4f. * Stores the skinning transform in the specified Matrix4f.
* The skinning transform applies the animation of the bone to a vertex. * The skinning transform applies the animation of the bone to a vertex.
@ -395,7 +396,7 @@ public final class Bone implements Savable {
* Used internally after model cloning. * Used internally after model cloning.
* @param attachNode * @param attachNode
*/ */
public void setAttachmentsNode(Node attachNode) { void setAttachmentsNode(Node attachNode) {
this.attachNode = attachNode; this.attachNode = attachNode;
} }

@ -56,6 +56,7 @@ public final class BoneTrack implements Savable {
private CompactQuaternionArray rotations; private CompactQuaternionArray rotations;
private CompactVector3Array scales; private CompactVector3Array scales;
private float[] times; private float[] times;
// temp vectors for interpolation // temp vectors for interpolation
private transient final Vector3f tempV = new Vector3f(); private transient final Vector3f tempV = new Vector3f();
private transient final Quaternion tempQ = new Quaternion(); private transient final Quaternion tempQ = new Quaternion();

@ -76,8 +76,6 @@ public abstract class Light implements Savable, Cloneable {
* If light is disabled, it will not take effect. * If light is disabled, it will not take effect.
*/ */
protected boolean enabled = true; protected boolean enabled = true;
/** The light's name. */
protected String name;
/** /**
* @return The color of the light. * @return The color of the light.
@ -102,22 +100,6 @@ public abstract class Light implements Savable, Cloneable {
return enabled; return enabled;
} }
/**
* This method sets the light's name.
* @param name the light's name
*/
public void setName(String name) {
this.name = name;
}
/**
* This method returns the light's name.
* @return the light's name
*/
public String getName() {
return name;
}
@Override @Override
public Light clone(){ public Light clone(){
try { try {

@ -40,7 +40,7 @@ import java.util.Iterator;
* *
* @author Nate * @author Nate
*/ */
public final class IntMap<T> implements Iterable<Entry>, Cloneable { public final class IntMap<T> implements Iterable<Entry<T>>, Cloneable {
private Entry[] table; private Entry[] table;
private final float loadFactor; private final float loadFactor;
@ -193,11 +193,11 @@ public final class IntMap<T> implements Iterable<Entry>, Cloneable {
size = 0; size = 0;
} }
public Iterator<Entry> iterator() { public Iterator<Entry<T>> iterator() {
return (Iterator<Entry>) new IntMapIterator(); return (Iterator<Entry<T>>) new IntMapIterator();
} }
final class IntMapIterator implements Iterator<Entry> { final class IntMapIterator implements Iterator<Entry<T>> {
/** /**
* Current entry. * Current entry.

Loading…
Cancel
Save