/** Add a node to the model. Use any of the part(...) method to add a NodePart. * @return The node being created. */ public Node node () { final Node node = new Node(); node(node); node.id = "node" + model.nodes.size; return node; }
/** Add a node to the model. Use any of the part(...) method to add a NodePart. * @return The node being created. */ public Node node () { final Node node = new Node(); node(node); node.id = "node" + model.nodes.size; return node; }
/** Creates a nested copy of this Node, any child nodes are copied using this method as well. The {@link #parts} are copied * using the {@link NodePart#copy()} method. Note that that method copies the material and nodes (bones) by reference. If you * intend to use the copy in a different node tree (e.g. a different Model or ModelInstance) then you will need to update these * references afterwards. * * Override this method in your custom Node class to instantiate that class, in that case you should override the * {@link #set(Node)} method as well. */ public Node copy () { return new Node().set(this); }
/** Creates a nested copy of this Node, any child nodes are copied using this method as well. The {@link #parts} are copied * using the {@link NodePart#copy()} method. Note that that method copies the material and nodes (bones) by reference. If you * intend to use the copy in a different node tree (e.g. a different Model or ModelInstance) then you will need to update these * references afterwards. * * Override this method in your custom Node class to instantiate that class, in that case you should override the * {@link #set(Node)} method as well. */ public Node copy () { return new Node().set(this); }
/** Adds the nodes of the specified model to a new node of the model being build. After this method the given model can no * longer be used. Do not call the {@link Model#dispose()} method on that model. * @return The newly created node containing the nodes of the given model. */ public Node node (final String id, final Model model) { final Node node = new Node(); node.id = id; node.addChildren(model.nodes); node(node); for (final Disposable disposable : model.getManagedDisposables()) manage(disposable); return node; }
/** Adds the nodes of the specified model to a new node of the model being build. After this method the given model can no * longer be used. Do not call the {@link Model#dispose()} method on that model. * @return The newly created node containing the nodes of the given model. */ public Node node (final String id, final Model model) { final Node node = new Node(); node.id = id; node.addChildren(model.nodes); node(node); for (final Disposable disposable : model.getManagedDisposables()) manage(disposable); return node; }
protected Node loadNode (ModelNode modelNode) { Node node = new Node(); node.id = modelNode.id;
protected Node loadNode (ModelNode modelNode) { Node node = new Node(); node.id = modelNode.id;
/** Add a node to the model. Use any of the part(...) method to add a NodePart. * @return The node being created. */ public Node node () { final Node node = new Node(); node(node); node.id = "node" + model.nodes.size; return node; }
/** * Add a node to the model. Use any of the part(...) method to add a * NodePart. * * @return The node being created. */ public Node node() { final Node node = new Node(); node(node); node.id = "node" + model.nodes.size; return node; }
/** Creates a nested copy of this Node, any child nodes are copied using this method as well. The {@link #parts} are copied * using the {@link NodePart#copy()} method. Note that that method copies the material and nodes (bones) by reference. If you * intend to use the copy in a different node tree (e.g. a different Model or ModelInstance) then you will need to update these * references afterwards. * * Override this method in your custom Node class to instantiate that class, in that case you should override the * {@link #set(Node)} method as well. */ public Node copy () { return new Node().set(this); }
/** Adds the nodes of the specified model to a new node of the model being build. After this method the given model can no * longer be used. Do not call the {@link Model#dispose()} method on that model. * @return The newly created node containing the nodes of the given model. */ public Node node (final String id, final Model model) { final Node node = new Node(); node.id = id; node.addChildren(model.nodes); node(node); for (final Disposable disposable : model.getManagedDisposables()) manage(disposable); return node; }
/** * Adds the nodes of the specified model to a new node of the model being * build. After this method the given model can no longer be used. Do not * call the {@link Model#dispose()} method on that model. * * @return The newly created node containing the nodes of the given model. */ public Node node(final String id, final Model model) { final Node node = new Node(); node.id = id; node.addChildren(model.nodes); node(node); for (final Disposable disposable : model.getManagedDisposables()) manage(disposable); return node; }
protected Node loadNode (ModelNode modelNode) { Node node = new Node(); node.id = modelNode.id;
@Deprecated public static Model createFromMesh(final Mesh mesh, int indexOffset, int vertexCount, int primitiveType, final Material material) { Model result = new Model(); MeshPart meshPart = new MeshPart(); meshPart.id = "part1"; meshPart.offset = indexOffset; meshPart.size = vertexCount; meshPart.primitiveType = primitiveType; meshPart.mesh = mesh; NodePart partMaterial = new NodePart(); partMaterial.material = material; partMaterial.meshPart = meshPart; Node node = new Node(); node.id = "node1"; node.parts.add(partMaterial); result.meshes.add(mesh); result.materials.add(material); result.nodes.add(node); result.meshParts.add(meshPart); result.manageDisposable(mesh); return result; }