|
@@ -33,6 +33,7 @@ package com.jme3.scene.plugins.fbx;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* Defines animations set that will be created while loading FBX scene
|
|
@@ -72,11 +73,41 @@ public class AnimationList {
|
|
|
cue.lastFrame = lastFrame;
|
|
|
list.add(cue);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean equals(Object obj) {
|
|
|
+ if (this == obj) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (obj == null) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (getClass() != obj.getClass()) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ final AnimationList other = (AnimationList)obj;
|
|
|
+ return Objects.equals(this.list, other.list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ return 119 + Objects.hashCode(this.list);
|
|
|
+ }
|
|
|
|
|
|
static class AnimInverval {
|
|
|
String name;
|
|
|
String layerName;
|
|
|
int firstFrame;
|
|
|
int lastFrame;
|
|
|
+ // hashCode generator, for good measure
|
|
|
+ @Override
|
|
|
+ public int hashCode() {
|
|
|
+ int hash = 7;
|
|
|
+ hash = 29 * hash + Objects.hashCode(this.name);
|
|
|
+ hash = 29 * hash + Objects.hashCode(this.layerName);
|
|
|
+ hash = 29 * hash + this.firstFrame;
|
|
|
+ hash = 29 * hash + this.lastFrame;
|
|
|
+ return hash;
|
|
|
+ }
|
|
|
}
|
|
|
}
|