From 2e56e1f24c429dc0a826dcc3e67706fd14b340a4 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Mon, 20 Apr 2020 17:01:49 -0700 Subject: [PATCH] Fixes issue #1350 (MorphTrack documentation) --- .../src/main/java/com/jme3/anim/MorphTrack.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/anim/MorphTrack.java b/jme3-core/src/main/java/com/jme3/anim/MorphTrack.java index a6dc4a7d9..b453f8487 100644 --- a/jme3-core/src/main/java/com/jme3/anim/MorphTrack.java +++ b/jme3-core/src/main/java/com/jme3/anim/MorphTrack.java @@ -65,8 +65,10 @@ public class MorphTrack implements AnimTrack { /** * Creates a morph track with the given Geometry as a target * - * @param times a float array with the time of each frame - * @param weights the morphs for each frames + * @param times a float array with the time of each frame (alias created + * -- do not modify after passing it to this constructor) + * @param weights the morphs for each frames (alias created -- do not + * modify after passing it to this constructor) */ public MorphTrack(Geometry target, float[] times, float[] weights, int nbMorphTargets) { this.target = target; @@ -95,7 +97,8 @@ public class MorphTrack implements AnimTrack { /** * Sets the keyframes times for this Joint track * - * @param times the keyframes times + * @param times the keyframes times (alias created -- do not modify after + * passing it to this setter) */ public void setTimes(float[] times) { if (times.length == 0) { @@ -109,9 +112,10 @@ public class MorphTrack implements AnimTrack { /** * Set the weight for this morph track * - * @param times a float array with the time of each frame - * @param weights the weights of the morphs for each frame - + * @param times a float array with the time of each frame (alias created + * -- do not modify after passing it to this setter) + * @param weights the weights of the morphs for each frame (alias created + * -- do not modify after passing it to this setter) */ public void setKeyframes(float[] times, float[] weights) { setTimes(times); @@ -211,6 +215,7 @@ public class MorphTrack implements AnimTrack { @Override public void cloneFields(Cloner cloner, Object original) { this.target = cloner.clone(target); + // Note: interpolator, times, and weights are not cloned }