/** * Copies all Fog information from <code>originalNode</code> into the current node. This method is * called from the <code>cloneNode</code> method which is, in turn, called by the <code>cloneTree * </code> method. * * <p> * * @param originalNode the original node to duplicate. * @param forceDuplicate when set to <code>true</code>, causes the <code>duplicateOnCloneTree * </code> flag to be ignored. When <code>false</code>, the value of each node's <code> * duplicateOnCloneTree</code> variable determines whether NodeComponent data is duplicated or * copied. * @exception RestrictedAccessException if this object is part of a live or compiled scenegraph. * @see Node#duplicateNode * @see Node#cloneTree * @see NodeComponent#setDuplicateOnCloneTree */ @Override void duplicateAttributes(Node originalNode, boolean forceDuplicate) { super.duplicateAttributes(originalNode, forceDuplicate); FogRetained attr = (FogRetained) originalNode.retained; FogRetained rt = (FogRetained) retained; Color3f c = new Color3f(); attr.getColor(c); rt.initColor(c); rt.initInfluencingBounds(attr.getInfluencingBounds()); Enumeration<Group> elm = attr.getAllScopes(); while (elm.hasMoreElements()) { // this reference will set correctly in updateNodeReferences() callback rt.initAddScope(elm.nextElement()); } // this reference will set correctly in updateNodeReferences() callback rt.initInfluencingBoundingLeaf(attr.getInfluencingBoundingLeaf()); }