⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 groupretained.java

📁 JAVA3D矩陈的相关类
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
	    processAddNodesForScopedModelClip(mModelClip,  list,  k);	}    }        void processAddNodesForScopedModelClip(ModelClipRetained mModelClip,				       ArrayList list,					HashKey k) {	if (allocatedMclips)	    addModelClip(mModelClip, k);	// If the source is live, then notify the children	if (this.source.isLive() || this.isInSetLive()) {	    for (int i = children.size()-1; i >=0; i--) {		NodeRetained child = (NodeRetained)children.get(i);		if(child != null) {		    if (child instanceof GroupRetained && (child.source.isLive()||child.isInSetLive() ))			((GroupRetained)child).processAddNodesForScopedModelClip(									      mModelClip, list,  k);		    else if (child instanceof LinkRetained && (child.source.isLive()||child.isInSetLive() )) {			int lastCount = k.count;			LinkRetained ln = (LinkRetained) child;			if (k.count == 0) {			    k.append(locale.nodeId);			}			((GroupRetained)(ln.sharedGroup)).			    processAddNodesForScopedModelClip(mModelClip, list,							   k.append("+").append(ln.nodeId));			k.count = lastCount;		    } else if (child instanceof Shape3DRetained && child.source.isLive()) {			((Shape3DRetained)child).getMirrorObjects(list,  k);		    } else if (child instanceof MorphRetained && child.source.isLive()) {			((MorphRetained)child).getMirrorObjects(list, k);		    }		}	    }	}    }    void removeAllNodesForScopedModelClip(ModelClipRetained mModelClip, ArrayList list, HashKey k) {	if (inSharedGroup) {	    for (int i = 0; i < localToVworldKeys.length; i++) {		k.set(localToVworldKeys[i]);		processRemoveAllNodesForScopedModelClip(mModelClip,  list,  k);	    }	}	else {	    processRemoveAllNodesForScopedModelClip(mModelClip,  list,  k);	}	    }    // If its a group, then add the scope to the group, if    // its a shape, then keep a list to be added during    // updateMirrorObject    void processRemoveAllNodesForScopedModelClip(ModelClipRetained mModelClip, ArrayList list, HashKey k) {	// If the source is live, then notify the children	if (allocatedMclips)	    removeModelClip(mModelClip, k);	if (this.source.isLive() && !isInClearLive) {	    for (int i = children.size()-1; i >=0; i--) {		NodeRetained child = (NodeRetained)children.get(i);		if(child != null) {		    if (child instanceof GroupRetained &&(child.source.isLive() &&							    ! ((GroupRetained)child).isInClearLive))			((GroupRetained)child).processRemoveAllNodesForScopedModelClip(mModelClip, list, k);		    else if (child instanceof LinkRetained && child.source.isLive()) {			int lastCount = k.count;			LinkRetained ln = (LinkRetained) child;			if (k.count == 0) {			    k.append(locale.nodeId);			}			((GroupRetained)(ln.sharedGroup)).			    processRemoveAllNodesForScopedModelClip(mModelClip, list, k.append("+").							append(ln.nodeId));			k.count = lastCount;		    } else if (child instanceof Shape3DRetained && child.source.isLive() ) {			((Shape3DRetained)child).getMirrorObjects(list, k);		    } else if (child instanceof MorphRetained && child.source.isLive()) {			((MorphRetained)child).getMirrorObjects(list,  k);		    }		}	    }	}    }    void addAllNodesForScopedAltApp(AlternateAppearanceRetained mAltApp, ArrayList list, HashKey k) {	if (inSharedGroup) {	    for (int i = 0; i < localToVworldKeys.length; i++) {		k.set(localToVworldKeys[i]);		processAddNodesForScopedAltApp(mAltApp,  list,  k);	    }	}	else {	    processAddNodesForScopedAltApp(mAltApp,  list,  k);	}    }        // If its a group, then add the scope to the group, if    // its a shape, then keep a list to be added during    // updateMirrorObject    void processAddNodesForScopedAltApp(AlternateAppearanceRetained mAltApp, ArrayList list, HashKey k) {	// If the source is live, then notify the children	if (allocatedAltApps)	    addAltApp(mAltApp, k);	if (this.source.isLive() || this.isInSetLive()) {	    for (int i = children.size()-1; i >=0; i--) {		NodeRetained child = (NodeRetained)children.get(i);		if(child != null) {		    if (child instanceof GroupRetained && (child.source.isLive() || child.isInSetLive()))			((GroupRetained)child).processAddNodesForScopedAltApp(mAltApp, list, k);		    else if (child instanceof LinkRetained && child.source.isLive()) {			int lastCount = k.count;			LinkRetained ln = (LinkRetained) child;			if (k.count == 0) {			    k.append(locale.nodeId);			}			((GroupRetained)(ln.sharedGroup)).			    processAddNodesForScopedAltApp(mAltApp, list, k.append("+").							append(ln.nodeId));			k.count = lastCount;		    } else if (child instanceof Shape3DRetained && child.source.isLive() ) {			((Shape3DRetained)child).getMirrorObjects(list, k);		    } else if (child instanceof MorphRetained && child.source.isLive()) {			((MorphRetained)child).getMirrorObjects(list,  k);		    }		}	    }	}    }    void removeAllNodesForScopedAltApp(AlternateAppearanceRetained mAltApp, ArrayList list, HashKey k) {	if (inSharedGroup) {	    for (int i = 0; i < localToVworldKeys.length; i++) {		k.set(localToVworldKeys[i]);		processRemoveNodesForScopedAltApp(mAltApp,  list,  k);	    }	}	else {	    processAddNodesForScopedAltApp(mAltApp,  list,  k);	}    }    // If its a group, then add the scope to the group, if    // its a shape, then keep a list to be added during    // updateMirrorObject    void processRemoveNodesForScopedAltApp(AlternateAppearanceRetained mAltApp, ArrayList list, HashKey k) {	// If the source is live, then notify the children	if (allocatedAltApps)	    removeAltApp(mAltApp, k);	if (this.source.isLive() && !isInClearLive) {	    for (int i = children.size()-1; i >=0; i--) {		NodeRetained child = (NodeRetained)children.get(i);		if(child != null) {		    if (child instanceof GroupRetained &&(child.source.isLive() &&							    ! ((GroupRetained)child).isInClearLive))			((GroupRetained)child).processRemoveNodesForScopedAltApp(mAltApp, list, k);		    else if (child instanceof LinkRetained && child.source.isLive()) {			int lastCount = k.count;			LinkRetained ln = (LinkRetained) child;			if (k.count == 0) {			    k.append(locale.nodeId);			}			((GroupRetained)(ln.sharedGroup)).			    processRemoveNodesForScopedAltApp(mAltApp, list, k.append("+").							append(ln.nodeId));			k.count = lastCount;		    } else if (child instanceof Shape3DRetained && child.source.isLive() ) {			((Shape3DRetained)child).getMirrorObjects(list, k);		    } else if (child instanceof MorphRetained && child.source.isLive()) {			((MorphRetained)child).getMirrorObjects(list,  k);		    }		}	    }	}    }    synchronized void setLightScope() {	// Make group's own copy	ArrayList newLights;	if (!allocatedLights) {	    allocatedLights = true;	    if (lights != null) {		newLights = new ArrayList(lights.size());		int size = lights.size();		for (int i = 0; i < size; i++) {		    ArrayList l = (ArrayList)lights.get(i);		    if (l != null) {			newLights.add(l.clone());		    }		    else {			newLights.add(null);		    }		}	    }	    else {		if (inSharedGroup) {		    newLights = new ArrayList();		    for (int i = 0; i < localToVworldKeys.length; i++) {			newLights.add(new ArrayList());		    }		}		else {		    newLights = new ArrayList();		    newLights.add(new ArrayList());		}	    }	    lights = newLights;	    	}	scopingRefCount++;    }    synchronized void removeLightScope() {	scopingRefCount--;    }   synchronized void setFogScope() {	// Make group's own copy	ArrayList newFogs;	if (!allocatedFogs) {	    allocatedFogs = true;	    if (fogs != null) {		newFogs = new ArrayList(fogs.size());		int size = fogs.size();		for (int i = 0; i < size; i++) {		    ArrayList l = (ArrayList)fogs.get(i);		    if (l != null) {			newFogs.add(l.clone());		    }		    else {			newFogs.add(null);		    }		}	    }	    else {		if (inSharedGroup) {		    newFogs = new ArrayList();		    for (int i = 0; i < localToVworldKeys.length; i++) {			newFogs.add(new ArrayList());		    };		}		else {		    newFogs = new ArrayList();		    newFogs.add(new ArrayList());		}	    }	    fogs = newFogs;	    	}	scopingRefCount++;    }    synchronized void removeFogScope() {	scopingRefCount--;    }   synchronized void setMclipScope() {	// Make group's own copy	ArrayList newMclips;	if (!allocatedMclips) {	    allocatedMclips = true;	    if (modelClips != null) {		newMclips = new ArrayList(modelClips.size());		int size = modelClips.size();		for (int i = 0; i < size; i++) {		    ArrayList l = (ArrayList)modelClips.get(i);		    if (l != null) {			newMclips.add(l.clone());		    }		    else {			newMclips.add(null);		    }		}	    }	    else {		if (inSharedGroup) {		    newMclips =new ArrayList();		    for (int i = 0; i < localToVworldKeys.length; i++) {			newMclips.add(new ArrayList());		    }		}		else {		    newMclips = new ArrayList();		    newMclips.add(new ArrayList());		}	    }	    modelClips = newMclips;	    	}	scopingRefCount++;    }    synchronized void removeMclipScope() {	scopingRefCount--;    }   synchronized void setAltAppScope() {	// Make group's own copy	ArrayList newAltApps;	if (!allocatedAltApps) {	    allocatedAltApps = true;	    if (altAppearances != null) {		newAltApps = new ArrayList(altAppearances.size());		int size = altAppearances.size();		for (int i = 0; i < size; i++) {		    ArrayList l = (ArrayList)altAppearances.get(i);		    if (l != null) {			newAltApps.add(l.clone());		    }		    else {			newAltApps.add(null);		    }		}	    }	    else {		if (inSharedGroup) {		    newAltApps = new ArrayList();		    for (int i = 0; i < localToVworldKeys.length; i++) {			newAltApps.add(new ArrayList());		    }		}		else {		    newAltApps = new ArrayList();		    newAltApps.add(new ArrayList());		}	    }	    altAppearances = newAltApps;	    	}	scopingRefCount++;    }    synchronized void removeAltAppScope() {	scopingRefCount--;    }        synchronized boolean usedInScoping() {	return (scopingRefCount > 0);    }         // Add a light to the list of lights     void addLight(LightRetained[] addlight, int numLgts, HashKey key) {	 ArrayList l;	 if (inSharedGroup) {	     int hkIndex = key.equals(localToVworldKeys, 0, localToVworldKeys.length);	     l = (ArrayList)lights.get(hkIndex);	     if (l != null) {		 for (int i = 0; i < numLgts; i++) {		     l.add(addlight[i]);		 }	     }	 }	 else {	     l = (ArrayList)lights.get(0);	     for (int i = 0; i < numLgts; i++) {		 l.add(addlight[i]);	     }	 }     }      // Add a fog to the list of fogs      void addFog(FogRetained fog, HashKey key) {	 ArrayList l;	 if (inSharedGroup) {	     int hkIndex = key.equals(localToVworldKeys, 0, localToVworldKeys.length);	     l = (ArrayList)fogs.get(hkIndex);	     if (l != null) {		 l.add(fog);	     }	 }	 else {	     l = (ArrayList)fogs.get(0);	     l.add(fog);	 }       }       // Add a ModelClip to the list of ModelClip      void addModelClip(ModelClipRetained modelClip, HashKey key) {	 ArrayList l;	 if (inSharedGroup) {	     int hkIndex = key.equals(localToVworldKeys, 0, localToVworldKeys.length);	     l = (ArrayList)modelClips.get(hkIndex);	     if (l != null) {		 l.add(modelClip);	     }	 }	 else {	     l = (ArrayList)modelClips.get(0);	     l.add(modelClip);	 }      }      // Add a alt appearance to the list of alt appearance      void addAltApp(AlternateAppearanceRetained altApp, HashKey key) {	 ArrayList l;	 if (inSharedGroup) {	     int hkIndex = key.equals(localToVworldKeys, 0, localToVworldKeys.length);	     l = (ArrayList)altAppearances.get(hkIndex);	     if (l != null) {		 l.add(altApp);	     }	 }	 else {	     l = (ArrayList)altAppearances.get(0);	     l.add(altApp);	 }       }        // Remove a fog from the list of fogs    void removeFog(FogRetained fog, HashKey key) {	 ArrayList l;	 int index;	 if (inSharedGroup) {	     int hkIndex = key.equals(localToVworldKeys, 0, localToVworldKeys.length);	     l = (ArrayList)fogs.get(hkIndex);	     if (l != null) {		 index = l.indexOf(fog);		 l.remove(index);	     }	 }	 else {	     l = (ArrayList)fogs.get(0);	     index = l.indexOf(fog);	     l.remove(index);	 }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -