Jelajahi Sumber

jme3-plugins: rename the TrackData.checkTimesConsistantcy() method (#1818)

* jme3-plugins:  rename the TrackData.checkTimesConsistantcy() method

* TrackData:  correct my mistake (oops!)
Stephen Gold 3 tahun lalu
induk
melakukan
8af0c92991

+ 14 - 2
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/TrackData.java

@@ -172,12 +172,19 @@ public class TrackData {
             }
         }
 
-        checkTimesConsistantcy();
+        checkTimesConsistency();
 
         length = times[times.length - 1];
     }
 
-    public void checkTimesConsistantcy() {
+    /**
+     * Verify that the
+     * {@link #times}, {@link #translations}, {@link #rotations}, and
+     * {@link #scales} vectors all have the same length, if present.
+     *
+     * @throws AssetLoadException if the lengths differ
+     */
+    public void checkTimesConsistency() {
         if ((translations != null && times.length != translations.length)
                 || (rotations != null && times.length != rotations.length)
                 || (scales != null && times.length != scales.length)) {
@@ -185,6 +192,11 @@ public class TrackData {
         }
     }
 
+    @Deprecated
+    public void checkTimesConsistantcy() {
+        checkTimesConsistency();
+    }
+
     private void populateTransform(Type type, int index, List<KeyFrame> keyFrames, KeyFrame currentKeyFrame, TransformIndices transformIndices) {
         Object transform = getTransform(type, currentKeyFrame);
         if (transform != null) {