/** Computes this Spatial's world bounding volume in the most efficient manner possible. */ void checkDoBoundUpdate() { if ((refreshFlags & RF_BOUND) == 0) { return; } checkDoTransformUpdate(); // Go to children recursively and update their bound if (this instanceof Node) { Node node = (Node) this; int len = node.getQuantity(); for (int i = 0; i < len; i++) { Spatial child = node.getChild(i); child.checkDoBoundUpdate(); } } // All children's bounds have been updated. Update my own now. updateWorldBound(); }