HashKey[] getNewKeys(String localeNodeId, HashKey oldKeys[]) { HashKey newKeys[]; if (!inSharedGroup) { newKeys = new HashKey[1]; newKeys[0] = new HashKey(localeNodeId); newKeys[0].append(plus + nodeId); } else { // Need to append this link node id to all keys passed in. newKeys = new HashKey[oldKeys.length]; for (int i=oldKeys.length-1; i>=0; i--) { newKeys[i] = new HashKey(oldKeys[i].toString() + plus + nodeId); } } return newKeys; }
/** * Get the localToVworld transform for a node */ void getLocalToVworld(Transform3D t, HashKey key) { HashKey newKey = new HashKey(key); computeLocalToVworld(this, this, newKey, t); }
Shape3DRetained getMirrorShape(SceneGraphPath path) { if (!inSharedGroup) { return mirrorShape3D.get(0); } HashKey key = new HashKey(""); path.getHashKey(key); return getMirrorShape(key); }
Shape3DRetained getMirrorShape(SceneGraphPath path) { if (!inSharedGroup) { return (Shape3DRetained) mirrorShape3D.get(0); } HashKey key = new HashKey(""); path.getHashKey(key); return getMirrorShape(key); }
key = new HashKey(key);
nodeR = this; collide[i] = true; key = new HashKey(localToVworldKeys[i]);
nodeR = this; pick[i] = true; key = new HashKey(localToVworldKeys[i]);
NodeRetained prevNode = null; if (key != null) { key = new HashKey(key);
child = (linkNode == null)? childNode: linkNode; parent = parentNode; key = new HashKey(localToVworldKeys[i]);
key = new HashKey(key);
nodeR = this; transformLevels[i] = -1; key = new HashKey(localToVworldKeys[i]);
/** * Get the localToVworld transform for a node. */ void getLocalToVworld(SceneGraphPath path, Transform3D t) { HashKey key = new HashKey(""); if (inSharedGroup == false) { throw new IllegalSharingException(J3dI18N.getString("NodeRetained1")); } path.validate(key); computeLocalToVworld(this, this, key, t); }
void transformBounds(SceneGraphPath path, Bounds bound) { if (!((NodeRetained) path.item.retained).inSharedGroup) { bound.transform(getCurrentLocalToVworld()); } else { HashKey key = new HashKey(""); path.getHashKey(key); bound.transform(getCurrentLocalToVworld(key)); } }
/** * Transform the input bound by the current LocalToVWorld, this * one overwrite the one defined in NodeRetained since for * TransformGroup, it has to use currentChildLocalToVworld * instead of currentLocalToVworld */ @Override void transformBounds(SceneGraphPath path, Bounds bound) { if (!((NodeRetained) path.item.retained).inSharedGroup) { bound.transform(getCurrentChildLocalToVworld()); } else { HashKey key = new HashKey(""); path.getHashKey(key); bound.transform(getCurrentChildLocalToVworld(key)); } }
/** * 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() ); }
HashKey currentKey = new HashKey();