/** * Marks dirty the bounding sphere of this world. */ public void dirtyBoundingSphere() { super.dirtyBoundingSphere(); }
/** * Marks dirty the bounding sphere of this node (and any parent nodes). * If dirty when the method {@link #getBoundingSphere(boolean)} * is next called, this node's bounding sphere will be recomputed. */ public void dirtyBoundingSphere() { if (_boundingSphere!=null) { _boundingSphere = null; for (Group parent : _parentList) parent.dirtyBoundingSphere(); } }
/** * Removes the specified child node from this group's list of children. If * the node is not a child of this group, then this method does nothing. * @param child the child node. */ public void removeChild(Node child) { if (child.removeParent(this)) { _childList.remove(child); dirtyBoundingSphere(); dirtyDraw(); World worldGroup = getWorld(); if (worldGroup!=null) worldGroup.updateSelectedSet(child); } }
/** * Adds the specified child node to this group's list of children. If the * node is already a child of this group, then this method does nothing. * <p> * The child must not be a world (root) node, because a world has no * parents. Also, if this group is in a world, the child must not already * be in a different world. A node cannot be in more than one world at a * time; it must be removed from one world before it can be added to another. * @param child the child node. */ public void addChild(Node child) { Check.argument(!(child instanceof World),"child is not a world"); World worldChild = child.getWorld(); World worldGroup = getWorld(); Check.argument( worldChild==null || worldGroup==null || worldChild==worldGroup, "child is not already in a different world"); if (child.addParent(this)) { _childList.add(child); dirtyBoundingSphere(); dirtyDraw(); if (worldGroup!=null) worldGroup.updateSelectedSet(child); } }