HashKey(String str) { this(str.length() + 16); append(str); }
void getHashKey(HashKey key) { if (interior != null) { key.reset(); key.append(root.nodeId); for(int i=0; i<interior.length; i++) { Node node = interior[i]; if (!node.isLive()) { throw new RuntimeException(J3dI18N.getString("SceneGraphPath3")); } NodeRetained nodeR = (NodeRetained) node.retained; if (nodeR.nodeType == NodeRetained.LINK) { key.append("+").append(nodeR.nodeId); } } } }
@Override int[] processViewSpecificInfo(int mode, HashKey k, View v, ArrayList vsgList, int[] keyList, ArrayList leafList) { int nchildren = children.size(); if (source.isLive()) { for (int i = 0; i < nchildren; i++) { NodeRetained child = children.get(i); if (child instanceof LeafRetained) { if (child instanceof LinkRetained) { int lastCount = k.count; LinkRetained ln = (LinkRetained) child; if (k.count == 0) { k.append(locale.nodeId); } keyList = ((GroupRetained)(ln.sharedGroup)). processViewSpecificInfo(mode, k.append("+").append(ln.nodeId), v, vsgList, keyList, leafList); k.count = lastCount; } else { ((LeafRetained)child).getMirrorObjects(leafList, k); } } else { keyList = child.processViewSpecificInfo(mode, k, v, vsgList, keyList, leafList); } } } return keyList; }
/** * Returns a hash number based on the data values in this * object. Two different SceneGraphPath objects with identical data * values (ie, returns true for trans.equals(SceneGraphPath) ) will * return the same hash number. Two Paths with different data members * may return the same hash value, although this is not likely. * @return the integer hash value */ @Override public int hashCode() { HashKey key = new HashKey(250); // NOTE: Needed to add interior != null because this method is called // by object.toString() when interior is null. if(interior != null && item != null) { for(int i=0; i<interior.length; i++) { key.append(LinkRetained.plus).append( item.toString() ); } } return( key.hashCode() + transform.hashCode() ); }
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 = 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 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 = 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); } } } } }
void processRemoveAllNodesForScopedFog(FogRetained mfog, ArrayList list, HashKey k) { // If the source is live, then notify the children if (allocatedFogs) removeFog(mfog, k); if (this.source.isLive() && !isInClearLive) { for (int i = children.size()-1; i >=0; i--) { NodeRetained child = children.get(i); if(child != null) { if (child instanceof GroupRetained &&(child.source.isLive() && ! ((GroupRetained)child).isInClearLive)) ((GroupRetained)child).processRemoveAllNodesForScopedFog(mfog, 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)). processRemoveAllNodesForScopedFog(mfog, 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 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 = 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 processAllNodesForScopedLight(int numLgts, LightRetained[] ml, ArrayList list, HashKey k) { if (allocatedLights) { addLight(ml, numLgts, k); } if (this.source.isLive() || this.isInSetLive()) { for (int i = children.size()-1; i >=0; i--) { NodeRetained child = children.get(i); if(child != null) { if (child instanceof GroupRetained && (child.source.isLive() || child.isInSetLive())) ((GroupRetained)child).processAllNodesForScopedLight(numLgts, ml, 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)). processAllNodesForScopedLight(numLgts, ml, 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 processAddNodesForScopedFog(FogRetained mfog, ArrayList list, HashKey k) { // If this group has it own scoping list then add .. if (allocatedFogs) addFog(mfog, 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 = children.get(i); if(child != null) { if (child instanceof GroupRetained && (child.source.isLive()|| child.isInSetLive())) ((GroupRetained)child).processAddNodesForScopedFog(mfog, 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)). processAddNodesForScopedFog(mfog, 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); } } } } }
ln = (LinkRetained)obj; currentKey.set(localToVworldKeys[index]); currentKey.append(LinkRetained.plus).append(ln.nodeId); if ((ln.sharedGroup != null) && (ln.sharedGroup.localToVworldKeys != null)) { ln = (LinkRetained)obj; currentKey.reset(); currentKey.append(locale.nodeId); currentKey.append(LinkRetained.plus).append(ln.nodeId); if ((ln.sharedGroup != null) && (ln.sharedGroup.localToVworldKeys != null)) {