@Override public Spatial detachChildAt(final int index) { return _targetScene.detachChildAt(index); }
@Override public Spatial detachChildAt(final int index) { return _targetScene.detachChildAt(index); }
/** * * <code>detachAllChildren</code> removes all children attached to this node. */ public void detachAllChildren() { for (int i = getNumberOfChildren() - 1; i >= 0; i--) { detachChildAt(i); } logger.fine("All children removed."); }
/** * * <code>detachAllChildren</code> removes all children attached to this node. */ public void detachAllChildren() { for (int i = getNumberOfChildren() - 1; i >= 0; i--) { detachChildAt(i); } logger.fine("All children removed."); }
/** * <code>detachChild</code> removes a given child from the node's list. This child will no longe be maintained. * * @param child * the child to remove. * @return the index the child was at. -1 if the child was not in the list. */ public int detachChild(final Spatial child) { if (child == null) { return -1; } if (child.getParent() == this) { final int index = _children.indexOf(child); if (index != -1) { detachChildAt(index); } return index; } return -1; }
/** * <code>detachChild</code> removes a given child from the node's list. This child will no longe be maintained. * * @param child * the child to remove. * @return the index the child was at. -1 if the child was not in the list. */ public int detachChild(final Spatial child) { if (child == null) { return -1; } if (child.getParent() == this) { final int index = _children.indexOf(child); if (index != -1) { detachChildAt(index); } return index; } return -1; }
/** * <code>detachChild</code> removes a given child from the node's list. This child will no longe be maintained. Only * the first child with a matching name is removed. * * @param childName * the child to remove. * @return the index the child was at. -1 if the child was not in the list. */ public int detachChildNamed(final String childName) { if (childName == null) { return -1; } for (int i = getNumberOfChildren() - 1; i >= 0; i--) { final Spatial child = _children.get(i); if (childName.equals(child.getName())) { detachChildAt(i); return i; } } return -1; }
/** * <code>detachChild</code> removes a given child from the node's list. This child will no longe be maintained. Only * the first child with a matching name is removed. * * @param childName * the child to remove. * @return the index the child was at. -1 if the child was not in the list. */ public int detachChildNamed(final String childName) { if (childName == null) { return -1; } for (int i = getNumberOfChildren() - 1; i >= 0; i--) { final Spatial child = _children.get(i); if (childName.equals(child.getName())) { detachChildAt(i); return i; } } return -1; }