aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-animation
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2014-09-24 23:27:40 +0200
committerJulien Gouesse <[email protected]>2014-09-24 23:27:40 +0200
commitf38dd328528849161455361c0ed0b2214634f98f (patch)
treed4496008e054ee3eec0b320f6a1251eb2fb05c75 /ardor3d-animation
parentfd1fca3240bca358b2f4e18fbcb6f4393318727d (diff)
Stops using Guava to create the lists, the sets and the maps except when it is really necessary
Diffstat (limited to 'ardor3d-animation')
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java11
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java3
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java8
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java8
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java8
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java8
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java10
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java5
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java6
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java4
-rw-r--r--ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java5
21 files changed, 60 insertions, 64 deletions
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java
index 9bda101..6a69e91 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AnimationManager.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.animation.skeletal;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -21,7 +22,6 @@ import com.ardor3d.extension.animation.skeletal.util.LoggingMap;
import com.ardor3d.scenegraph.Spatial;
import com.ardor3d.util.ReadOnlyTimer;
import com.ardor3d.util.Timer;
-import com.google.common.collect.Lists;
import com.google.common.collect.MapMaker;
/**
@@ -61,7 +61,7 @@ public class AnimationManager {
protected AnimationApplier _applier;
/** Our animation layers. */
- protected final List<AnimationLayer> _layers = Lists.newArrayList();
+ protected final List<AnimationLayer> _layers = new ArrayList<AnimationLayer>();
/**
* A map of key->Double values, allowing control over elements under this manager without needing precise knowledge
@@ -97,7 +97,7 @@ public class AnimationManager {
/**
* Listeners for changes to this manager's AnimationUpdateState.
*/
- protected final List<AnimationUpdateStateListener> _updateStateListeners = Lists.newArrayList();
+ protected final List<AnimationUpdateStateListener> _updateStateListeners = new ArrayList<AnimationUpdateStateListener>();
/**
* Construct a new AnimationManager.
@@ -130,10 +130,9 @@ public class AnimationManager {
layer.setManager(this);
_layers.add(layer);
+ _applyToPoses = new ArrayList<SkeletonPose>();
if (pose != null) {
- _applyToPoses = Lists.newArrayList(pose);
- } else {
- _applyToPoses = Lists.newArrayList();
+ _applyToPoses.add(pose);
}
_valuesStore.setLogOnReplace(false);
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java
index 41d2fdb..6a06fce 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkeletonPose.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.animation.skeletal;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.annotation.SavableFactory;
@@ -21,7 +22,6 @@ import com.ardor3d.util.export.CapsuleUtils;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
-import com.google.common.collect.Lists;
/**
* Joins a Skeleton with an array of joint poses. This allows the skeleton to exist and be reused between multiple
@@ -48,7 +48,7 @@ public class SkeletonPose implements Savable {
/**
* The list of elements interested in notification when this SkeletonPose updates. Not saved to savable.
*/
- private transient final List<PoseListener> _poseListeners = Lists.newArrayListWithCapacity(1);
+ private transient final List<PoseListener> _poseListeners = new ArrayList<PoseListener>(1);
/**
* Construct a new SkeletonPose using the given Skeleton.
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java
index 2859105..5a30091 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/SkinnedMesh.java
@@ -28,7 +28,6 @@ import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
import com.ardor3d.util.geom.BufferUtils;
-import com.google.common.collect.Sets;
/**
* Mesh supporting deformation via skeletal animation.
@@ -624,7 +623,7 @@ public class SkinnedMesh extends Mesh implements PoseListener {
final short[] joints = new short[vcount * maxCount];
final float[] weights = new float[vcount * maxCount];
- final TreeSet<JointWeight> weightSort = Sets.newTreeSet();
+ final TreeSet<JointWeight> weightSort = new TreeSet<JointWeight>();
// Walk through old data vertex by vertex
int index;
for (int i = 0; i < vcount; i++) {
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java
index 13e0284..7f2cb9f 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/BinaryLERPSource.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.animation.skeletal.blendtree;
+import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.clip.TransformData;
import com.ardor3d.math.MathUtils;
-import com.google.common.collect.Maps;
/**
* <p>
@@ -115,7 +115,7 @@ public class BinaryLERPSource extends AbstractTwoPartSource {
Map<String, Object> rVal = store;
if (rVal == null) {
- rVal = Maps.newHashMap();
+ rVal = new HashMap<String, Object>();
}
for (final Entry<String, ? extends Object> entryAData : sourceAData.entrySet()) {
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java
index 3d65439..c75a943 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ExclusiveClipSource.java
@@ -10,6 +10,8 @@
package com.ardor3d.extension.animation.skeletal.blendtree;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -17,8 +19,6 @@ import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.clip.AnimationClip;
import com.ardor3d.extension.animation.skeletal.clip.JointChannel;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* Similar to a ClipSource, this class samples and returns values from the channels of an AnimationClip.
@@ -27,7 +27,7 @@ import com.google.common.collect.Maps;
public class ExclusiveClipSource extends ClipSource {
/** Our List of channels to exclude by name. */
- private final List<String> _disabledChannels = Lists.newArrayList();
+ private final List<String> _disabledChannels = new ArrayList<String>();
/**
* Construct a new source. Clip and Manager must be set separately before use.
@@ -91,7 +91,7 @@ public class ExclusiveClipSource extends ClipSource {
final Map<String, ? extends Object> orig = super.getSourceData(manager);
// make a copy, removing specific channels
- final Map<String, ? extends Object> data = Maps.newHashMap(orig);
+ final Map<String, Object> data = new HashMap<String, Object>(orig);
if (_disabledChannels != null) {
for (final String key : _disabledChannels) {
data.remove(key);
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java
index f8a260f..55ff54f 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/InclusiveClipSource.java
@@ -10,6 +10,8 @@
package com.ardor3d.extension.animation.skeletal.blendtree;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -17,8 +19,6 @@ import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.clip.AnimationClip;
import com.ardor3d.extension.animation.skeletal.clip.JointChannel;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* Similar to a ClipSource, this class samples and returns values from the channels of an AnimationClip.
@@ -28,7 +28,7 @@ import com.google.common.collect.Maps;
public class InclusiveClipSource extends ClipSource {
/** Our List of channels to include by name. */
- private final List<String> _enabledChannels = Lists.newArrayList();
+ private final List<String> _enabledChannels = new ArrayList<String>();
/**
* Construct a new source. Clip and Manager must be set separately before use.
@@ -92,7 +92,7 @@ public class InclusiveClipSource extends ClipSource {
final Map<String, ? extends Object> orig = super.getSourceData(manager);
// make a copy, only bringing across specific channels
- final Map<String, Object> data = Maps.newHashMap();
+ final Map<String, Object> data = new HashMap<String, Object>();
if (_enabledChannels != null) {
for (final String key : _enabledChannels) {
if (orig.containsKey(key)) {
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java
index c2eae12..3b7e9ff 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ManagedTransformSource.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.animation.skeletal.blendtree;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
@@ -20,7 +21,6 @@ import com.ardor3d.extension.animation.skeletal.clip.JointData;
import com.ardor3d.math.type.ReadOnlyQuaternion;
import com.ardor3d.math.type.ReadOnlyVector3;
import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Maps;
/**
* This tree source maintains its own source data, which can be modified directly using setJointXXX. This source is
@@ -29,7 +29,7 @@ import com.google.common.collect.Maps;
public class ManagedTransformSource implements BlendTreeSource {
/** Our local source data. */
- private final Map<String, JointData> data = Maps.newHashMap();
+ private final Map<String, JointData> data = new HashMap<String, JointData>();
/** optional: name of source we were initialized from, if given. */
private String sourceName;
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java
index cc89913..39ca36e 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClip.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.annotation.SavableFactory;
@@ -19,7 +20,6 @@ import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.ardor3d.util.export.Savable;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
/**
* AnimationClip manages a set of animation channels as a single clip entity.
@@ -41,7 +41,7 @@ public class AnimationClip implements Savable {
*/
public AnimationClip(final String name) {
_name = name;
- _channels = Lists.newArrayList();
+ _channels = new ArrayList<AbstractAnimationChannel>();
}
/**
@@ -52,7 +52,7 @@ public class AnimationClip implements Savable {
*/
public AnimationClip(final String name, final List<AbstractAnimationChannel> channels) {
_name = name;
- _channels = Lists.newArrayList(channels);
+ _channels = new ArrayList<AbstractAnimationChannel>(channels);
updateMaxTimeIndex();
}
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java
index 14f8816..35bd687 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AnimationClipInstance.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.animation.skeletal.clip;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ardor3d.extension.animation.skeletal.AnimationListener;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
/**
* Maintains state information about an instance of a specific animation clip, such as time scaling applied, active
@@ -40,7 +40,7 @@ public class AnimationClipInstance {
private double _startTime = 0.0;
/** Map of channel name -> state tracking objects. */
- private final Map<String, Object> _clipStateObjects = Maps.newHashMap();
+ private final Map<String, Object> _clipStateObjects = new HashMap<String, Object>();
/** List of callbacks for animation events. */
private List<AnimationListener> animationListeners = null;
@@ -53,7 +53,7 @@ public class AnimationClipInstance {
*/
public void addAnimationListener(final AnimationListener animationListener) {
if (animationListeners == null) {
- animationListeners = Lists.newArrayList();
+ animationListeners = new ArrayList<AnimationListener>();
}
animationListeners.add(animationListener);
}
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java
index 394a585..c76aeba 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/GuaranteedTriggerChannel.java
@@ -10,10 +10,10 @@
package com.ardor3d.extension.animation.skeletal.clip;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.annotation.SavableFactory;
-import com.google.common.collect.Lists;
/**
* An animation source channel consisting of keyword samples indicating when a specific trigger condition is met. Each
@@ -49,7 +49,7 @@ public class GuaranteedTriggerChannel extends TriggerChannel {
if (oldIndex == newIndex) {
triggerData.arm(newIndex, _keys[newIndex]);
} else {
- final List<String> triggers = Lists.newArrayList();
+ final List<String> triggers = new ArrayList<String>();
for (int i = oldIndex + 1; i <= newIndex; i++) {
if (_keys[i] != null) {
triggers.add(_keys[i]);
@@ -85,8 +85,8 @@ public class GuaranteedTriggerChannel extends TriggerChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<String> keys = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<String> keys = new ArrayList<String>();
final TriggerData tData = new TriggerData();
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java
index d2efc88..a8e8f4e 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedDoubleChannel.java
@@ -12,12 +12,12 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.math.MathUtils;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
-import com.google.common.collect.Lists;
/**
* An animation source channel consisting of double value samples. These samples are interpolated between key frames.
@@ -90,8 +90,8 @@ public class InterpolatedDoubleChannel extends AbstractAnimationChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<Double> keys = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<Double> keys = new ArrayList<Double>();
final double[] data = new double[1];
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java
index d1b4cd2..71f0c40 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/InterpolatedFloatChannel.java
@@ -12,12 +12,12 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.math.MathUtils;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
-import com.google.common.collect.Lists;
/**
* An animation source channel consisting of float value samples. These samples are interpolated between key frames.
@@ -90,8 +90,8 @@ public class InterpolatedFloatChannel extends AbstractAnimationChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<Float> keys = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<Float> keys = new ArrayList<Float>();
final float[] data = new float[1];
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java
index 9738dcb..2af0042 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformChannel.java
@@ -12,6 +12,7 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
@@ -25,7 +26,6 @@ import com.ardor3d.util.export.CapsuleUtils;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
/**
* An animation channel consisting of a series of transforms interpolated over time.
@@ -200,10 +200,10 @@ public class TransformChannel extends AbstractAnimationChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<ReadOnlyQuaternion> rotations = Lists.newArrayList();
- final List<ReadOnlyVector3> translations = Lists.newArrayList();
- final List<ReadOnlyVector3> scales = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<ReadOnlyQuaternion> rotations = new ArrayList<ReadOnlyQuaternion>();
+ final List<ReadOnlyVector3> translations = new ArrayList<ReadOnlyVector3>();
+ final List<ReadOnlyVector3> scales = new ArrayList<ReadOnlyVector3>();
final TransformData tData = new TransformData();
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java
index 47eabd9..0a48964 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerChannel.java
@@ -12,12 +12,12 @@ package com.ardor3d.extension.animation.skeletal.clip;
import java.io.IOException;
import java.lang.reflect.Field;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.annotation.SavableFactory;
import com.ardor3d.util.export.InputCapsule;
import com.ardor3d.util.export.OutputCapsule;
-import com.google.common.collect.Lists;
/**
* An animation source channel consisting of keyword samples indicating when a specific trigger condition is met. Each
@@ -94,8 +94,8 @@ public class TriggerChannel extends AbstractAnimationChannel {
if (startTime > endTime) {
throw new IllegalArgumentException("startTime > endTime");
}
- final List<Float> times = Lists.newArrayList();
- final List<String> keys = Lists.newArrayList();
+ final List<Float> times = new ArrayList<Float>();
+ final List<String> keys = new ArrayList<String>();
final TriggerData tData = new TriggerData();
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java
index 7c0220f..5c62785 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TriggerData.java
@@ -10,17 +10,16 @@
package com.ardor3d.extension.animation.skeletal.clip;
+import java.util.ArrayList;
import java.util.List;
-import com.google.common.collect.Lists;
-
/**
* Transient class that maintains the current triggers and armed status for a TriggerChannel.
*/
public class TriggerData {
/** The current trigger name. */
- private final List<String> _currentTriggers = Lists.newArrayList();
+ private final List<String> _currentTriggers = new ArrayList<String>();
/**
* The current channel sample index. We keep this to make sure we don't miss two channels in a row with the same
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java
index eebf755..242d1f8 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/AnimationLayer.java
@@ -10,6 +10,7 @@
package com.ardor3d.extension.animation.skeletal.layer;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
@@ -19,7 +20,6 @@ import com.ardor3d.extension.animation.skeletal.state.AbstractFiniteState;
import com.ardor3d.extension.animation.skeletal.state.AbstractTransitionState;
import com.ardor3d.extension.animation.skeletal.state.StateOwner;
import com.ardor3d.extension.animation.skeletal.state.SteadyState;
-import com.google.common.collect.Maps;
/**
* Animation layers are essentially independent state machines, managed by a single AnimationManager. Each maintains a
@@ -36,7 +36,7 @@ public class AnimationLayer implements StateOwner {
private static final Logger logger = Logger.getLogger(AnimationLayer.class.getName());
/** Our animation states */
- private final Map<String, SteadyState> _steadyStates = Maps.newHashMap();
+ private final Map<String, SteadyState> _steadyStates = new HashMap<String, SteadyState>();
/** Our current animation state */
private AbstractFiniteState _currentState;
@@ -51,7 +51,7 @@ public class AnimationLayer implements StateOwner {
private final String _name;
/** A map of general transitions for moving from the current state to another. */
- private final Map<String, AbstractTransitionState> _transitions = Maps.newHashMap();
+ private final Map<String, AbstractTransitionState> _transitions = new HashMap<String, AbstractTransitionState>();
/**
* Construct a new AnimationLayer.
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java
index a838755..8efbcbe 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/AbstractTwoStateLerpTransition.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.animation.skeletal.state;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.blendtree.BinaryLERPSource;
import com.ardor3d.extension.animation.skeletal.layer.AnimationLayer;
import com.ardor3d.math.MathUtils;
-import com.google.common.collect.Maps;
/**
* An abstract transition state that blends between two other states.
@@ -195,7 +195,7 @@ public abstract class AbstractTwoStateLerpTransition extends AbstractTransitionS
// too many new transform data objects. This assumes that a
// same state always returns the same transform data objects.
if (_sourceData == null) {
- _sourceData = Maps.newHashMap();
+ _sourceData = new HashMap<String, Object>();
}
return BinaryLERPSource.combineSourceData(sourceAData, sourceBData, getPercent(), _sourceData);
}
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java
index 58b8ccd..3145509 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/ImmediateTransitionState.java
@@ -10,11 +10,11 @@
package com.ardor3d.extension.animation.skeletal.state;
+import java.util.HashMap;
import java.util.Map;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.layer.AnimationLayer;
-import com.google.common.collect.Maps;
/**
* Cuts directly to the set target state, without any intermediate transition action.
@@ -49,7 +49,7 @@ public class ImmediateTransitionState extends AbstractTransitionState {
*/
@Override
public Map<String, ? extends Object> getCurrentSourceData(final AnimationManager manager) {
- return Maps.newHashMap();
+ return new HashMap<String, Object>();
}
/**
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java
index 992d83d..325fb4a 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/SteadyState.java
@@ -10,13 +10,13 @@
package com.ardor3d.extension.animation.skeletal.state;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import com.ardor3d.extension.animation.skeletal.AnimationManager;
import com.ardor3d.extension.animation.skeletal.blendtree.BlendTreeSource;
import com.ardor3d.extension.animation.skeletal.layer.AnimationLayer;
-import com.google.common.collect.Maps;
/**
* A "steady" state is an animation state that is concrete and stand-alone (vs. a state that handles transitioning
@@ -28,7 +28,7 @@ public class SteadyState extends AbstractFiniteState {
private final String _name;
/** A map of possible transitions for moving from this state to another. */
- private final Map<String, AbstractTransitionState> _transitions = Maps.newHashMap();
+ private final Map<String, AbstractTransitionState> _transitions = new HashMap<String, AbstractTransitionState>();
/** A transition to use if we reach the end of this state. May be null. */
private AbstractTransitionState _endTransition;
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java
index b72b548..8a0e34f 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/state/loader/OutputStore.java
@@ -10,10 +10,10 @@
package com.ardor3d.extension.animation.skeletal.state.loader;
+import java.util.ArrayList;
import java.util.List;
import com.ardor3d.extension.animation.skeletal.AttachmentPoint;
-import com.google.common.collect.Lists;
/**
* Storage class for items created during Layer import.
@@ -21,7 +21,7 @@ import com.google.common.collect.Lists;
public class OutputStore {
/** List of attachment points created during layer import. */
- private final List<AttachmentPoint> _attachments = Lists.newArrayList();
+ private final List<AttachmentPoint> _attachments = new ArrayList<AttachmentPoint>();
/** List of animation clip sources encountered during layer import. */
private final OutputClipSourceMap _usedClipSources = new OutputClipSourceMap();
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java
index ab7ea19..95eb5db 100644
--- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java
+++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/LoggingMap.java
@@ -11,12 +11,11 @@
package com.ardor3d.extension.animation.skeletal.util;
import java.util.Collection;
+import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
-import com.google.common.collect.Maps;
-
/**
* This class essentially just wraps a KEY->VALUE HashMap, providing extra logging when a VALUE is not found, or
* duplicate VALUE objects are added. An optional callback may be provided to try to load values not present in this
@@ -29,7 +28,7 @@ public class LoggingMap<KEY, VALUE> {
private static final Logger logger = Logger.getLogger(LoggingMap.class.getName());
/** Our map of values. */
- protected final Map<KEY, VALUE> _wrappedMap = Maps.newHashMap();
+ protected final Map<KEY, VALUE> _wrappedMap = new HashMap<KEY, VALUE>();
/** If not null, this callback is asked to load the missing value using the key. */
private MissingCallback<KEY, VALUE> _missCallback = null;