/** * 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) { setTimes(times); if (translations != null) { setKeyframesTranslation(translations); } if (rotations != null) { setKeyframesRotation(rotations); } if (scales != null) { setKeyframesScale(scales); } }
@Override public void read(JmeImporter im) throws IOException { InputCapsule ic = im.getCapsule(this); translations = (CompactVector3Array) ic.readSavable("translations", null); rotations = (CompactQuaternionArray) ic.readSavable("rotations", null); times = ic.readFloatArray("times", null); scales = (CompactVector3Array) ic.readSavable("scales", null); target = (HasLocalTransform) ic.readSavable("target", null); setTimes(times); }