@SuppressWarnings("unchecked") public void read(JMEImporter e) throws IOException { super.read(e); InputCapsule capsule = e.getCapsule(this); numObjects = capsule.readInt("numObjects", 0); Savable[] savs = capsule.readSavableArray("toChange", new Spatial[0]); if (savs == null) { toChange = null; } else { toChange = new Spatial[savs.length]; for (int x = 0; x < savs.length; x++) { toChange[x] = (Spatial) savs[x]; } } savs = capsule.readSavableArray("pivots", new TransformQuaternion[0]); if (savs == null) { pivots = null; } else { pivots = new TransformQuaternion[savs.length]; for (int x = 0; x < savs.length; x++) { pivots[x] = (TransformQuaternion) savs[x]; } } parentIndexes = capsule.readIntArray("parentIndexes", new int[0]); keyframes = capsule.readSavableArrayList("keyframes", new ArrayList()); haveChanged = capsule.readBooleanArray("haveChanged", new boolean[0]); beginPointTime = (PointInTime) capsule.readSavable("beginPointTime", null); endPointTime = (PointInTime) capsule.readSavable("endPointTime", null); }
public void read(JMEImporter e) throws IOException { super.read(e); InputCapsule capsule = e.getCapsule(this); mover = (Spatial) capsule.readSavable("mover", null); curve = (Curve) capsule.readSavable("curve", null); up = (Vector3f) capsule.readSavable("up", null); orientationPrecision = capsule.readFloat("orientationPrecision", 0.1f); cycleForward = capsule.readBoolean("cycleForward", true); autoRotation = capsule.readBoolean("autoRotation", false); }
@Override public void read(JMEImporter e) throws IOException { super.read(e); InputCapsule capsule = e.getCapsule(this); translationDelta = (Vector3f) capsule.readSavable("translationDelta", null); rotationDelta = capsule.readFloat("rotationDelta", 0); textureRotationAxis = (Vector3f) capsule.readSavable("textureRotationAxis", null); xRepeat = capsule.readFloat("xRepeat", 1); yRepeat = capsule.readFloat("yRepeat", 1); zRepeat = capsule.readFloat("zRepeat", 1); currentTranslation = (Vector3f) capsule.readSavable("currentTranslation", null); currentRotation = (Quaternion) capsule.readSavable("currentRotation", null); currentRotationAngle = capsule.readFloat("currentRotationAngle", 0); Savable[] savs = capsule.readSavableArray("textures", null); if (savs != null) { textures = new Texture[savs.length]; for (int i = 0; i < savs.length; i++) { textures[i] = (Texture) savs[i]; } } }