/** * Set the rotations for this joint track * * @param rotations the rotations of the bone for each frame */ public void setKeyframesRotation(Quaternion[] rotations) { if (times == null) { throw new RuntimeException("TransformTrack doesn't have any time for key frames, please call setTimes first"); } if (rotations.length == 0) { throw new RuntimeException("TransformTrack with no rotation keyframes!"); } this.rotations = new CompactQuaternionArray(); this.rotations.add(rotations); this.rotations.freeze(); assert times != null && times.length == rotations.length; }
/** * Set the translations and rotations for this bone track * * @param times the time of each frame, measured from the start of the track * (not null, length>0) * @param translations the translation of the bone for each frame (not null, * same length as times) * @param rotations the rotation of the bone for each frame (not null, same * length as times) */ public void setKeyframes(float[] times, Vector3f[] translations, Quaternion[] rotations) { if (times.length == 0) { throw new RuntimeException("BoneTrack with no keyframes!"); } assert translations != null; assert times.length == translations.length; assert rotations != null; assert times.length == rotations.length; this.times = times; this.translations = new CompactVector3Array(); this.translations.add(translations); this.translations.freeze(); this.rotations = new CompactQuaternionArray(); this.rotations.add(rotations); this.rotations.freeze(); }
this.rotations = new CompactQuaternionArray(); this.rotations.add(rotations); this.rotations.freeze();
System.arraycopy(sav, 0, rotCopy, 0, sav.length); rotations.add(rotCopy); rotations.freeze();
/** * Set the translations and rotations for this bone track * @param times a float array with the time of each frame * @param translations the translation of the bone for each frame * @param rotations the rotation of the bone for each frame */ public void setKeyframes(float[] times, Vector3f[] translations, Quaternion[] rotations) { if (times.length == 0) { throw new RuntimeException("BoneTrack with no keyframes!"); } assert times.length == translations.length && times.length == rotations.length; this.times = times; this.translations = new CompactVector3Array(); this.translations.add(translations); this.translations.freeze(); this.rotations = new CompactQuaternionArray(); this.rotations.add(rotations); this.rotations.freeze(); }
/** * Set the translations and rotations for this bone track * * @param times the time of each frame, measured from the start of the track * (not null, length>0) * @param translations the translation of the bone for each frame (not null, * same length as times) * @param rotations the rotation of the bone for each frame (not null, same * length as times) */ public void setKeyframes(float[] times, Vector3f[] translations, Quaternion[] rotations) { if (times.length == 0) { throw new RuntimeException("BoneTrack with no keyframes!"); } assert translations != null; assert times.length == translations.length; assert rotations != null; assert times.length == rotations.length; this.times = times; this.translations = new CompactVector3Array(); this.translations.add(translations); this.translations.freeze(); this.rotations = new CompactQuaternionArray(); this.rotations.add(rotations); this.rotations.freeze(); }
this.rotations = new CompactQuaternionArray(); this.rotations.add(rotations); this.rotations.freeze();
this.rotations = new CompactQuaternionArray(); this.rotations.add(rotations); this.rotations.freeze();
System.arraycopy(sav, 0, rotCopy, 0, sav.length); rotations.add(rotCopy); rotations.freeze();
System.arraycopy(sav, 0, rotCopy, 0, sav.length); rotations.add(rotCopy); rotations.freeze();