@Override protected void setParent(Node parent) { if( this.parent == null && parent != null ) { // We were a root before and now we aren't... make sure if // we had an updateList then we clear it completely to // avoid holding the dead array. updateList = null; updateListValid = false; } super.setParent(parent); }
@Override protected void setParent(Node parent) { super.setParent(parent); // If the geometry is managed by group node we need to unassociate. if (parent == null && isGrouped()) { unassociateFromGroupNode(); } }
/** * * <code>detachChildAt</code> removes a child at a given index. That child * is returned for saving purposes. * * @param index * the index of the child to be removed. * @return the child at the supplied index. */ public Spatial detachChildAt(int index) { Spatial child = children.remove(index); if ( child != null ) { child.setParent( null ); logger.log(Level.FINE, "{0}: Child removed.", this.toString()); // since a child with a bound was detached; // our own bound will probably change. setBoundRefresh(); // our world transform no longer influences the child. // XXX: Not necessary? Since child will have transform updated // when attached anyway. child.setTransformRefresh(); // lights are also inherited from parent child.setLightListRefresh(); child.setMatParamOverrideRefresh(); invalidateUpdateList(); } return child; }
child.getParent().detachChild(child); child.setParent(this); children.add(index, child);
@Override protected void setParent(Node parent) { if( this.parent == null && parent != null ) { // We were a root before and now we aren't... make sure if // we had an updateList then we clear it completely to // avoid holding the dead array. updateList = null; updateListValid = false; } super.setParent(parent); }
@Override protected void setParent(Node parent) { super.setParent(parent); //if the geometry is batched we also have to unbatch it if (parent == null && isBatched()) { unBatch(); } }
@Override protected void setParent(Node parent) { super.setParent(parent); // If the geometry is managed by group node we need to unassociate. if (parent == null && isGrouped()) { unassociateFromGroupNode(); } }
/** * * <code>detachChildAt</code> removes a child at a given index. That child * is returned for saving purposes. * * @param index * the index of the child to be removed. * @return the child at the supplied index. */ public Spatial detachChildAt(int index) { Spatial child = children.remove(index); if ( child != null ) { child.setParent( null ); logger.log(Level.INFO, "{0}: Child removed.", this.toString()); // since a child with a bound was detached; // our own bound will probably change. setBoundRefresh(); // our world transform no longer influences the child. // XXX: Not neccessary? Since child will have transform updated // when attached anyway. child.setTransformRefresh(); // lights are also inherited from parent child.setLightListRefresh(); } return child; }
child.getParent().detachChild(child); child.setParent(this); children.add(index, child); child.setTransformRefresh();
child.getParent().detachChild(child); child.setParent(this); children.add(child);
/** * * <code>detachChildAt</code> removes a child at a given index. That child * is returned for saving purposes. * * @param index * the index of the child to be removed. * @return the child at the supplied index. */ public Spatial detachChildAt(int index) { Spatial child = children.remove(index); if ( child != null ) { child.setParent( null ); logger.log(Level.FINE, "{0}: Child removed.", this.toString()); // since a child with a bound was detached; // our own bound will probably change. setBoundRefresh(); // our world transform no longer influences the child. // XXX: Not necessary? Since child will have transform updated // when attached anyway. child.setTransformRefresh(); // lights are also inherited from parent child.setLightListRefresh(); child.setMatParamOverrideRefresh(); invalidateUpdateList(); } return child; }
child.getParent().detachChild(child); child.setParent(this); children.add(index, child);