本文整理汇总了Java中com.badlogic.gdx.graphics.g3d.model.Node.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java Node.getChildren方法的具体用法?Java Node.getChildren怎么用?Java Node.getChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.graphics.g3d.model.Node
的用法示例。
在下文中一共展示了Node.getChildren方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawArmatureNodes
import com.badlogic.gdx.graphics.g3d.model.Node; //导入方法依赖的package包/类
private void drawArmatureNodes(Node currentNode, Vector3 modelPos,
Quaternion modelRot,
Vector3 parentNodePos, Vector3 currentNodePos) {
currentNode.globalTransform.getTranslation(currentNodePos);
modelRot.transform(currentNodePos);
currentNodePos.add(modelPos);
drawVertex(currentNodePos, 0.02f, Color.GREEN);
shapeRenderer.setColor(Color.YELLOW);
if (currentNode.hasParent()) {
shapeRenderer.line(parentNodePos, currentNodePos);
}
if (currentNode.hasChildren()) {
float x = currentNodePos.x;
float y = currentNodePos.y;
float z = currentNodePos.z;
for (Node child : currentNode.getChildren()) {
drawArmatureNodes(child, modelPos, modelRot, currentNodePos, parentNodePos);
currentNodePos.set(x, y, z);
}
}
}
示例2: copyNode
import com.badlogic.gdx.graphics.g3d.model.Node; //导入方法依赖的package包/类
private Node copyNode (Node node) {
Node copy = new Node();
copy.id = node.id;
copy.inheritTransform = node.inheritTransform;
copy.translation.set(node.translation);
copy.rotation.set(node.rotation);
copy.scale.set(node.scale);
copy.localTransform.set(node.localTransform);
copy.globalTransform.set(node.globalTransform);
for (NodePart nodePart : node.parts) {
copy.parts.add(copyNodePart(nodePart));
}
for (Node child : node.getChildren()) {
copy.addChild(copyNode(child));
}
return copy;
}
示例3: rebuildReferences
import com.badlogic.gdx.graphics.g3d.model.Node; //导入方法依赖的package包/类
private static void rebuildReferences (final Model model, final Node node) {
for (final NodePart mpm : node.parts) {
if (!model.materials.contains(mpm.material, true)) model.materials.add(mpm.material);
if (!model.meshParts.contains(mpm.meshPart, true)) {
model.meshParts.add(mpm.meshPart);
if (!model.meshes.contains(mpm.meshPart.mesh, true)) model.meshes.add(mpm.meshPart.mesh);
model.manageDisposable(mpm.meshPart.mesh);
}
}
for (final Node child : node.getChildren())
rebuildReferences(model, child);
}
示例4: getRenderables
import com.badlogic.gdx.graphics.g3d.model.Node; //导入方法依赖的package包/类
protected void getRenderables (Node node, Array<Renderable> renderables, Pool<Renderable> pool) {
if (node.parts.size > 0) {
for (NodePart nodePart : node.parts) {
if (nodePart.enabled) renderables.add(getRenderable(pool.obtain(), node, nodePart));
}
}
for (Node child : node.getChildren()) {
getRenderables(child, renderables, pool);
}
}
示例5: renderSkeleton
import com.badlogic.gdx.graphics.g3d.model.Node; //导入方法依赖的package包/类
public void renderSkeleton (final ModelInstance instance) {
shapeRenderer.setProjectionMatrix(cam.combined);
shapeRenderer.begin(ShapeType.Line);
for (Node node : instance.nodes) {
shapeRenderer.setColor(node.isAnimated ? Color.RED : Color.YELLOW);
node.globalTransform.getTranslation(tmpV);
shapeRenderer.box(tmpV.x, tmpV.y, tmpV.z, 0.5f, 0.5f, 0.5f);
for (Node child : node.getChildren())
renderSkeleton(tmpV, child);
}
shapeRenderer.end();
}
示例6: rebuildReferences
import com.badlogic.gdx.graphics.g3d.model.Node; //导入方法依赖的package包/类
private static void rebuildReferences(final Model model, final Node node) {
for (final NodePart mpm : node.parts) {
if (!model.materials.contains(mpm.material, true))
model.materials.add(mpm.material);
if (!model.meshParts.contains(mpm.meshPart, true)) {
model.meshParts.add(mpm.meshPart);
if (!model.meshes.contains(mpm.meshPart.mesh, true))
model.meshes.add(mpm.meshPart.mesh);
model.manageDisposable(mpm.meshPart.mesh);
}
}
Iterable<Node> nodeIter = node.getChildren();
for (final Node child : nodeIter)
rebuildReferences(model, child);
}