/** * Sets the automatic calcuation of geometric bounds of a node. * @param autoCompute is a boolean value indicating if automatic calcuation * of bounds */ void setBoundsAutoCompute(boolean autoCompute) { if (this.boundsAutoCompute==autoCompute) { return; } this.boundsAutoCompute = autoCompute; dirtyBoundsCache(); }
/** * Make the boundsCache of this node and all its parents dirty */ void dirtyBoundsCache() { // Possible optimisation is to not traverse up the tree // if the cachedBounds==null. However this is not the case // if the node is the child of a SharedGroup if (VirtualUniverse.mc.cacheAutoComputedBounds) { // Issue 514 : NPE in Wonderland : triggered in cached bounds computation validCachedBounds = false; if (parent!=null) { parent.dirtyBoundsCache(); } } } }