diff options
author | Julien Gouesse <[email protected]> | 2014-08-08 22:02:24 +0200 |
---|---|---|
committer | Julien Gouesse <[email protected]> | 2014-08-08 22:02:24 +0200 |
commit | d8553c06068332a2e604f1336238e5cdf12c762c (patch) | |
tree | cbd1b37833a82868bd30621ba1cf053f2853c6ed /ardor3d-animation | |
parent | 2835439b704b945e3121b5a9f17d207bc5b2c5ea (diff) |
Removes tons of warnings
Diffstat (limited to 'ardor3d-animation')
19 files changed, 45 insertions, 4 deletions
diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AttachmentPoint.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AttachmentPoint.java index be9f18d..d263e29 100644 --- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AttachmentPoint.java +++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/AttachmentPoint.java @@ -102,6 +102,7 @@ public class AttachmentPoint implements PoseListener { * Move our managed spatial to align with the referenced joint's position in the given pose, modified by our offset. * See class javadoc for more information. */ + @Override public void poseUpdated(final SkeletonPose pose) { // only update if we have something attached. if (_attachment != null) { diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/Joint.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/Joint.java index b5a0e4e..f4a6202 100644 --- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/Joint.java +++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/Joint.java @@ -98,10 +98,12 @@ public class Joint implements Savable { // Methods for Savable // ///////////////// + @Override public Class<? extends Joint> getClassTag() { return this.getClass(); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_name, "name", null); capsule.write(_index, "index", (short) 0); @@ -109,6 +111,7 @@ public class Joint implements Savable { capsule.write(_inverseBindPose, "inverseBindPose", (Savable) Transform.IDENTITY); } + @Override public void read(final InputCapsule capsule) throws IOException { final String name = capsule.readString("name", null); try { diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/Skeleton.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/Skeleton.java index ba4d69e..ec92cca 100644 --- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/Skeleton.java +++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/Skeleton.java @@ -80,15 +80,18 @@ public class Skeleton implements Savable { // Methods for Savable // ///////////////// + @Override public Class<? extends Skeleton> getClassTag() { return this.getClass(); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_name, "name", null); capsule.write(_joints, "joints", null); } + @Override public void read(final InputCapsule capsule) throws IOException { final String name = capsule.readString("name", null); final Joint[] joints = CapsuleUtils.asArray(capsule.readSavableArray("joints", null), Joint.class); 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 a0fa4c1..41d2fdb 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 @@ -234,15 +234,18 @@ public class SkeletonPose implements Savable { // Methods for Savable // ///////////////// + @Override public Class<? extends SkeletonPose> getClassTag() { return this.getClass(); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_skeleton, "skeleton", null); capsule.write(_localTransforms, "localTransforms", null); } + @Override public void read(final InputCapsule capsule) throws IOException { final Skeleton skeleton = (Skeleton) capsule.readSavable("skeleton", null); final Transform[] localTransforms = CapsuleUtils.asArray(capsule.readSavableArray("localTransforms", null), 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 aef1d9a..2859105 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 @@ -483,6 +483,7 @@ public class SkinnedMesh extends Mesh implements PoseListener { /** * Calls to apply our pose on pose update. */ + @Override public void poseUpdated(final SkeletonPose pose) { // custom behavior? if (_customApplier != null) { 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 5edb64d..13e0284 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 @@ -47,6 +47,7 @@ public class BinaryLERPSource extends AbstractTwoPartSource { setSourceB(sourceB); } + @Override public Map<String, ? extends Object> getSourceData(final AnimationManager manager) { // grab our data maps from the two sources final Map<String, ? extends Object> sourceAData = getSourceA() != null ? getSourceA().getSourceData(manager) @@ -58,6 +59,7 @@ public class BinaryLERPSource extends AbstractTwoPartSource { .combineSourceData(sourceAData, sourceBData, manager.getValuesStore().get(getBlendKey())); } + @Override public boolean setTime(final double globalTime, final AnimationManager manager) { // set our time on the two sub sources boolean foundActive = false; @@ -70,6 +72,7 @@ public class BinaryLERPSource extends AbstractTwoPartSource { return foundActive; } + @Override public void resetClips(final AnimationManager manager, final double globalStartTime) { // reset our two sub sources if (getSourceA() != null) { diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ClipSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ClipSource.java index 9674c8f..99107f7 100644 --- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ClipSource.java +++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/ClipSource.java @@ -61,6 +61,7 @@ public class ClipSource implements BlendTreeSource { /** * Sets the current time on our AnimationClip instance, accounting for looping and time scaling. */ + @Override public boolean setTime(final double globalTime, final AnimationManager manager) { final AnimationClipInstance instance = manager.getClipInstance(_clip); if (instance.isActive()) { @@ -98,6 +99,7 @@ public class ClipSource implements BlendTreeSource { return instance.isActive(); } + @Override public void resetClips(final AnimationManager manager, final double globalStartTime) { manager.resetClipInstance(_clip, globalStartTime); } diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/FrozenTreeSource.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/FrozenTreeSource.java index 192d522..db7aee5 100644 --- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/FrozenTreeSource.java +++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/blendtree/FrozenTreeSource.java @@ -31,6 +31,7 @@ public class FrozenTreeSource implements BlendTreeSource { _time = frozenTime; } + @Override public Map<String, ? extends Object> getSourceData(final AnimationManager manager) { return _source.getSourceData(manager); } @@ -38,6 +39,7 @@ public class FrozenTreeSource implements BlendTreeSource { /** * Ignores the command to reset our subtree. */ + @Override public void resetClips(final AnimationManager manager, final double globalStartTime) { _source.resetClips(manager, 0); } @@ -45,6 +47,7 @@ public class FrozenTreeSource implements BlendTreeSource { /** * Ignores the command to set time on our subtree */ + @Override public boolean setTime(final double globalTime, final AnimationManager manager) { _source.setTime(_time, manager); return true; 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 1806e6a..c2eae12 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 @@ -113,6 +113,7 @@ public class ManagedTransformSource implements BlendTreeSource { /** * Returns an immutable COPY of our local source data. */ + @Override public Map<String, JointData> getSourceData(final AnimationManager manager) { return ImmutableMap.copyOf(data); } @@ -120,6 +121,7 @@ public class ManagedTransformSource implements BlendTreeSource { /** * Does nothing. */ + @Override public boolean setTime(final double globalTime, final AnimationManager manager) { return true; } @@ -127,6 +129,7 @@ public class ManagedTransformSource implements BlendTreeSource { /** * Does nothing. */ + @Override public void resetClips(final AnimationManager manager, final double globalStartTime) { ; // ignore } diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AbstractAnimationChannel.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AbstractAnimationChannel.java index 199f80e..17eaba3 100644 --- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AbstractAnimationChannel.java +++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/AbstractAnimationChannel.java @@ -42,7 +42,7 @@ public abstract class AbstractAnimationChannel implements Savable { _channelName = channelName; _times = times == null ? null : new float[times.length]; if (_times != null) { - System.arraycopy(times, 0, _times, 0, times.length); + System.arraycopy(times, 0, _times, 0, _times.length); } } @@ -190,11 +190,13 @@ public abstract class AbstractAnimationChannel implements Savable { // Methods for Savable // ///////////////// + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_channelName, "channelName", null); capsule.write(_times, "times", null); } + @Override public void read(final InputCapsule capsule) throws IOException { final String channelName = capsule.readString("channelName", null); final float[] times = capsule.readFloatArray("times", null); 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 cb10165..cc89913 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 @@ -157,15 +157,18 @@ public class AnimationClip implements Savable { // Methods for Savable // ///////////////// + @Override public Class<? extends AnimationClip> getClassTag() { return this.getClass(); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_name, "name", null); capsule.writeSavableList(_channels, "channels", null); } + @Override public void read(final InputCapsule capsule) throws IOException { final String name = capsule.readString("name", null); try { 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 25dc43e..d2efc88 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 @@ -43,7 +43,7 @@ public class InterpolatedDoubleChannel extends AbstractAnimationChannel { super(channelName, times); _values = values == null ? null : new double[values.length]; if (_values != null) { - System.arraycopy(values, 0, _values, 0, values.length); + System.arraycopy(values, 0, _values, 0, _values.length); } } @@ -133,6 +133,7 @@ public class InterpolatedDoubleChannel extends AbstractAnimationChannel { // Methods for Savable // ///////////////// + @Override public Class<? extends InterpolatedDoubleChannel> getClassTag() { return this.getClass(); } 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 17f24d3..d1b4cd2 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 @@ -43,7 +43,7 @@ public class InterpolatedFloatChannel extends AbstractAnimationChannel { super(channelName, times); _values = values == null ? null : new float[values.length]; if (_values != null) { - System.arraycopy(values, 0, _values, 0, values.length); + System.arraycopy(values, 0, _values, 0, _values.length); } } @@ -133,6 +133,7 @@ public class InterpolatedFloatChannel extends AbstractAnimationChannel { // Methods for Savable // ///////////////// + @Override public Class<? extends InterpolatedFloatChannel> getClassTag() { return this.getClass(); } 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 07598f5..9738dcb 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 @@ -269,6 +269,7 @@ public class TransformChannel extends AbstractAnimationChannel { // Methods for Savable // ///////////////// + @Override public Class<? extends TransformChannel> getClassTag() { return this.getClass(); } diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformData.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformData.java index 15d4bc3..a9b59b8 100644 --- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformData.java +++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/clip/TransformData.java @@ -172,16 +172,19 @@ public class TransformData implements Savable { // Methods for Savable // ///////////////// + @Override public Class<? extends TransformData> getClassTag() { return this.getClass(); } + @Override public void write(final OutputCapsule capsule) throws IOException { capsule.write(_rotation, "rotation", new Quaternion(Quaternion.IDENTITY)); capsule.write(_scale, "scale", new Vector3(Vector3.ONE)); capsule.write(_translation, "translation", new Vector3(Vector3.ZERO)); } + @Override public void read(final InputCapsule capsule) throws IOException { setRotation((Quaternion) capsule.readSavable("rotation", new Quaternion(Quaternion.IDENTITY))); setScale((Vector3) capsule.readSavable("scale", new Vector3(Vector3.ONE))); 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 e6af818..47eabd9 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 @@ -43,7 +43,7 @@ public class TriggerChannel extends AbstractAnimationChannel { super(channelName, times); _keys = keys == null ? null : new String[keys.length]; if (_keys != null) { - System.arraycopy(keys, 0, _keys, 0, keys.length); + System.arraycopy(keys, 0, _keys, 0, _keys.length); } } @@ -132,6 +132,7 @@ public class TriggerChannel extends AbstractAnimationChannel { // Methods for Savable // ///////////////// + @Override public Class<? extends TriggerChannel> getClassTag() { return this.getClass(); } diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/LayerLERPBlender.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/LayerLERPBlender.java index d1c8043..f4883c0 100644 --- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/LayerLERPBlender.java +++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/layer/LayerLERPBlender.java @@ -32,10 +32,12 @@ public class LayerLERPBlender implements LayerBlender { /** Our second layer... generally the layer we were added to. */ private AnimationLayer _layerB; + @Override public String getBlendKey() { return _blendKey; } + @Override public void setBlendKey(final String blendKey) { _blendKey = blendKey; } @@ -44,6 +46,7 @@ public class LayerLERPBlender implements LayerBlender { return _layerA; } + @Override public void setLayerA(final AnimationLayer layer) { _layerA = layer; } @@ -52,10 +55,12 @@ public class LayerLERPBlender implements LayerBlender { return _layerB; } + @Override public void setLayerB(final AnimationLayer layer) { _layerB = layer; } + @Override public Map<String, ? extends Object> getBlendedSourceData(final AnimationManager manager) { // grab our data maps from the two layers... // set A 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 57d9d6f..a838755 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 @@ -200,6 +200,7 @@ public abstract class AbstractTwoStateLerpTransition extends AbstractTransitionS return BinaryLERPSource.combineSourceData(sourceAData, sourceBData, getPercent(), _sourceData); } + @Override public void replaceState(final AbstractFiniteState currentState, final AbstractFiniteState newState) { if (newState != null) { if (getStateA() == currentState) { diff --git a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/SkinUtils.java b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/SkinUtils.java index d94373c..204b515 100644 --- a/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/SkinUtils.java +++ b/ardor3d-animation/src/main/java/com/ardor3d/extension/animation/skeletal/util/SkinUtils.java @@ -29,6 +29,7 @@ public class SkinUtils { */ public static void setAutoUpdateBounds(final Spatial root, final boolean doUpdate) { root.acceptVisitor(new Visitor() { + @Override public void visit(final Spatial spatial) { // we only care about SkinnedMesh if (spatial instanceof SkinnedMesh) { |