本文整理了Java中com.ardor3d.scenegraph.Node.detachChildAt()
方法的一些代码示例,展示了Node.detachChildAt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.detachChildAt()
方法的具体详情如下:
包路径:com.ardor3d.scenegraph.Node
类名称:Node
方法名:detachChildAt
[英]detachChildAt
removes a child at a given index. That child is returned for saving purposes.
[中]detachChildAt
删除给定索引处的子项。那孩子是为了省钱才被送回的。
代码示例来源:origin: com.ardor3d/ardor3d-core
@Override
public Spatial detachChildAt(final int index) {
return _targetScene.detachChildAt(index);
}
代码示例来源:origin: Renanse/Ardor3D
@Override
public Spatial detachChildAt(final int index) {
return _targetScene.detachChildAt(index);
}
代码示例来源:origin: Renanse/Ardor3D
/**
*
* <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.");
}
代码示例来源:origin: com.ardor3d/ardor3d-core
/**
*
* <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.");
}
代码示例来源:origin: com.ardor3d/ardor3d-core
/**
* <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;
}
代码示例来源:origin: Renanse/Ardor3D
/**
* <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;
}
代码示例来源:origin: com.ardor3d/ardor3d-core
/**
* <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;
}
代码示例来源:origin: Renanse/Ardor3D
/**
* <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;
}
内容来源于网络,如有侵权,请联系作者删除!