/** * Set the scales for this joint track * * @param scales the scales of the bone for each frame */ public void setKeyframesScale(Vector3f[] scales) { if (times == null) { throw new RuntimeException("TransformTrack doesn't have any time for key frames, please call setTimes first"); } if (scales.length == 0) { throw new RuntimeException("TransformTrack with no scale keyframes!"); } this.scales = new CompactVector3Array(); this.scales.add(scales); this.scales.freeze(); assert times != null && times.length == scales.length; }
/** * Set the translations for this joint track * * @param translations the translation of the bone for each frame */ public void setKeyframesTranslation(Vector3f[] translations) { if (times == null) { throw new RuntimeException("TransformTrack doesn't have any time for key frames, please call setTimes first"); } if (translations.length == 0) { throw new RuntimeException("TransformTrack with no translation keyframes!"); } this.translations = new CompactVector3Array(); this.translations.add(translations); this.translations.freeze(); assert times != null && times.length == translations.length; }
/** * Set the translations, rotations and scales 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) * @param scales the scale of the bone for each frame (ignored if null) */ public void setKeyframes(float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales) { this.setKeyframes(times, translations, rotations); if (scales != null) { assert times.length == scales.length; this.scales = new CompactVector3Array(); this.scales.add(scales); this.scales.freeze(); } }
if (translations != null) { assert times.length == translations.length; this.translations = new CompactVector3Array(); this.translations.add(translations); this.translations.freeze(); this.scales = new CompactVector3Array(); this.scales.add(scales); this.scales.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(); }
Savable[] sav = ic.readSavableArray("translations", null); if (sav != null) { translations = new CompactVector3Array(); Vector3f[] transCopy = new Vector3f[sav.length]; System.arraycopy(sav, 0, transCopy, 0, sav.length);
/** * Set the translations, rotations and scales 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 * @param scales the scale of the bone for each frame */ public void setKeyframes(float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales) { this.setKeyframes(times, translations, rotations); assert times.length == scales.length; if (scales != null) { this.scales = new CompactVector3Array(); this.scales.add(scales); this.scales.freeze(); } }
/** * Set the translations, rotations and scales 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) * @param scales the scale of the bone for each frame (ignored if null) */ public void setKeyframes(float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales) { this.setKeyframes(times, translations, rotations); if (scales != null) { assert times.length == scales.length; this.scales = new CompactVector3Array(); this.scales.add(scales); this.scales.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(); }
if (translations != null) { assert times.length == translations.length; this.translations = new CompactVector3Array(); this.translations.add(translations); this.translations.freeze(); this.scales = new CompactVector3Array(); this.scales.add(scales); this.scales.freeze();
if (translations != null) { assert times.length == translations.length; this.translations = new CompactVector3Array(); this.translations.add(translations); this.translations.freeze(); this.scales = new CompactVector3Array(); this.scales.add(scales); this.scales.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(); }
Savable[] sav = ic.readSavableArray("translations", null); if (sav != null) { translations = new CompactVector3Array(); Vector3f[] transCopy = new Vector3f[sav.length]; System.arraycopy(sav, 0, transCopy, 0, sav.length);
Savable[] sav = ic.readSavableArray("translations", null); if (sav != null) { translations = new CompactVector3Array(); Vector3f[] transCopy = new Vector3f[sav.length]; System.arraycopy(sav, 0, transCopy, 0, sav.length);