com.ardor3d.scenegraph.Node.attachChildAt()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中com.ardor3d.scenegraph.Node.attachChildAt()方法的一些代码示例,展示了Node.attachChildAt()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.attachChildAt()方法的具体详情如下:
包路径:com.ardor3d.scenegraph.Node
类名称:Node
方法名:attachChildAt

Node.attachChildAt介绍

[英]attachChildAt attaches a child to this node at an index. This node becomes the child's parent. The current number of children maintained is returned.
If the child already had a parent it is detached from that former parent.
[中]attachChildAt在索引处将子节点附加到此节点。此节点将成为子节点的父节点。返回当前维护的子级数。
如果孩子已经有了父母,它就会与以前的父母分离。

代码示例

代码示例来源:origin: Renanse/Ardor3D

@Override
public int attachChildAt(final Spatial child, final int index) {
  return _targetScene.attachChildAt(child, index);
}

代码示例来源:origin: com.ardor3d/ardor3d-core

@Override
public int attachChildAt(final Spatial child, final int index) {
  return _targetScene.attachChildAt(child, index);
}

代码示例来源:origin: Renanse/Ardor3D

@Override
public int attachChildAt(final Spatial child, final int index) {
  if (!(child instanceof TextMesh)) {
    throw new IllegalArgumentException("Must be a TextMesh!");
  }
  return super.attachChildAt(child, index);
}

代码示例来源:origin: com.ardor3d/ardor3d-ui

@Override
public int attachChildAt(final Spatial child, final int index) {
  if (!(child instanceof TextMesh)) {
    throw new IllegalArgumentException("Must be a TextMesh!");
  }
  return super.attachChildAt(child, index);
}

相关文章