当前位置: 首页>>代码示例>>Java>>正文


Java Node.getChildren方法代码示例

本文整理汇总了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);
		}
	}
}
 
开发者ID:jsjolund,项目名称:GdxDemo3D,代码行数:22,代码来源:ArmatureDebugDrawer.java

示例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;
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:18,代码来源:ModelInstance.java

示例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);
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:13,代码来源:ModelBuilder.java

示例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);
	}
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:12,代码来源:ModelInstance.java

示例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();
}
 
开发者ID:basherone,项目名称:libgdxcn,代码行数:13,代码来源:SkeletonTest.java

示例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);
}
 
开发者ID:langurmonkey,项目名称:gaiasky,代码行数:16,代码来源:ModelBuilder2.java


注:本文中的com.badlogic.gdx.graphics.g3d.model.Node.getChildren方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。