/** * Called internally by com.jme3.util.clone.Cloner. Do not call directly. */ @Override public void cloneFields( Cloner cloner, Object original ) { super.cloneFields(cloner, original); this.terrain = cloner.clone(terrain); }
@Override public void cloneFields(final Cloner cloner, final Object original) { super.cloneFields(cloner, original); light = cloner.clone(light); }
@Override public void cloneFields( Cloner cloner, Object original ) { super.cloneFields(cloner, original); this.skeleton = cloner.clone(skeleton); // Note cloneForSpatial() never actually cloned the animation map... just its reference HashMap<String, Animation> newMap = new HashMap<>(); // animationMap is cloned, but only ClonableTracks will be cloned as they need a reference to a cloned spatial for( Map.Entry<String, Animation> e : animationMap.entrySet() ) { newMap.put(e.getKey(), cloner.clone(e.getValue())); } this.animationMap = newMap; }
@Override public void cloneFields(Cloner cloner, Object original) { super.cloneFields(cloner, original); Map<String, AnimClip> clips = new HashMap<>(); for (String key : animClipMap.keySet()) { clips.put(key, cloner.clone(animClipMap.get(key))); } Map<String, Action> act = new HashMap<>(); for (String key : actions.keySet()) { act.put(key, cloner.clone(actions.get(key))); } actions = act; animClipMap = clips; Map<String, Layer> newLayers = new LinkedHashMap<>(); for (String key : layers.keySet()) { newLayers.put(key, cloner.clone(layers.get(key))); } layers = newLayers; }
@Override public void cloneFields(final Cloner cloner, final Object original) { super.cloneFields(cloner, original); this.lodCalculator = cloner.clone(lodCalculator); this.cameras = new SafeArrayList<>(Camera.class, cameras); this.cameraLocations = new SafeArrayList<>(Vector3f.class); this.lastCameraLocations = new SafeArrayList<>(Vector3f.class); this.lodCalcRunning = new AtomicBoolean(); this.previousCameraLocation = new Vector3f(); }
@Override public void cloneFields( Cloner cloner, Object original ) { super.cloneFields(cloner, original); this.skeleton = cloner.clone(skeleton); // If the targets were cloned then this will clone them. If the targets // were shared then this will share them. this.targets = cloner.clone(targets); this.numberOfBonesParam = cloner.clone(numberOfBonesParam); this.boneMatricesParam = cloner.clone(boneMatricesParam); }
@Override public void cloneFields(Cloner cloner, Object original) { super.cloneFields(cloner, original); this.armature = cloner.clone(armature); // If the targets were cloned then this will clone them. If the targets // were shared then this will share them. this.targets = cloner.clone(targets); this.numberOfJointsParam = cloner.clone(numberOfJointsParam); this.jointMatricesParam = cloner.clone(jointMatricesParam); }
@Override public void cloneFields(final Cloner cloner, final Object original) { super.cloneFields(cloner, original); light = cloner.clone(light); }
@Override public void cloneFields( Cloner cloner, Object original ) { super.cloneFields(cloner, original); this.skeleton = cloner.clone(skeleton); // Note cloneForSpatial() never actually cloned the animation map... just its reference HashMap<String, Animation> newMap = new HashMap<>(); // animationMap is cloned, but only ClonableTracks will be cloned as they need a reference to a cloned spatial for( Map.Entry<String, Animation> e : animationMap.entrySet() ) { newMap.put(e.getKey(), cloner.clone(e.getValue())); } this.animationMap = newMap; }
@Override public void cloneFields( Cloner cloner, Object original ) { super.cloneFields(cloner, original); this.skeleton = cloner.clone(skeleton); // If the targets were cloned then this will clone them. If the targets // were shared then this will share them. this.targets = cloner.clone(targets); this.numberOfBonesParam = cloner.clone(numberOfBonesParam); this.boneMatricesParam = cloner.clone(boneMatricesParam); }