/** * Creates a bone track for the given bone index * @param targetBoneIndex the bone index * @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 BoneTrack(int targetBoneIndex, float[] times, Vector3f[] translations, Quaternion[] rotations) { this.targetBoneIndex = targetBoneIndex; this.setKeyframes(times, translations, rotations); }
/** * Creates a bone track for the given bone index * @param targetBoneIndex the bone index * @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 BoneTrack(int targetBoneIndex, float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales) { this.targetBoneIndex = targetBoneIndex; this.setKeyframes(times, translations, rotations, scales); }
/** * 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(); } }
/** * Creates a bone track for the given bone index * @param targetBoneIndex the bone index * @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 BoneTrack(int targetBoneIndex, float[] times, Vector3f[] translations, Quaternion[] rotations) { this.targetBoneIndex = targetBoneIndex; this.setKeyframes(times, translations, rotations); }
/** * Creates a bone track for the given bone index * @param targetBoneIndex the bone index * @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 BoneTrack(int targetBoneIndex, float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales) { this.targetBoneIndex = targetBoneIndex; this.setKeyframes(times, translations, rotations, scales); }
/** * Creates a bone track for the given bone index * @param targetBoneIndex the bone index * @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 BoneTrack(int targetBoneIndex, float[] times, Vector3f[] translations, Quaternion[] rotations) { this.targetBoneIndex = targetBoneIndex; this.setKeyframes(times, translations, rotations); }
/** * Creates a bone track for the given bone index * @param targetBoneIndex the bone index * @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 BoneTrack(int targetBoneIndex, float[] times, Vector3f[] translations, Quaternion[] rotations, Vector3f[] scales) { this.targetBoneIndex = targetBoneIndex; this.setKeyframes(times, translations, rotations, scales); }
Vector3f[] scalesArray = scales.toArray(new Vector3f[scales.size()]); track.setKeyframes(timesArray, transArray, rotArray, scalesArray);
Vector3f[] scalesArray = scales.toArray(new Vector3f[scales.size()]); track.setKeyframes(timesArray, transArray, rotArray, scalesArray);
Vector3f[] scalesArray = scales.toArray(new Vector3f[scales.size()]); track.setKeyframes(timesArray, transArray, rotArray, scalesArray);
/** * 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(); } }