Modifier and Type  Field and Description 

Matrix4 
globalTransform
the global transform, product of local transform and transform of the parent node, calculated via
calculateWorldTransform() 
java.lang.String 
id
the id, may be null, FIXME is this unique?

boolean 
inheritTransform
Whether this node should inherit the transformation of its parent node, defaults to true.

boolean 
isAnimated
Whether this node is currently being animated, if so the translation, rotation and scale values are not used.

Matrix4 
localTransform
the local transform, based on translation/rotation/scale (
calculateLocalTransform() ) or any applied animation 
protected Node 
parent 
Array<NodePart> 
parts 
Quaternion 
rotation
the rotation, relative to the parent, not modified by animations

Vector3 
scale
the scale, relative to the parent, not modified by animations

Vector3 
translation
the translation, relative to the parent, not modified by animations

Constructor and Description 

Node() 
Modifier and Type  Method and Description 

<T extends Node> 
addChild(T child)
Adds the specified node as the currently last child of this node.

<T extends Node> 
addChildren(java.lang.Iterable<T> nodes)
Adds the specified nodes as the currently last child of this node.

<T extends Node> 
attachTo(T parent)
Adds this node as child to specified parent Node, synonym for:
parent.addChild(this) 
void 
calculateBoneTransforms(boolean recursive) 
BoundingBox 
calculateBoundingBox(BoundingBox out)
Calculate the bounding box of this Node.

BoundingBox 
calculateBoundingBox(BoundingBox out,
boolean transform)
Calculate the bounding box of this Node.

Matrix4 
calculateLocalTransform()
Calculates the local transform based on the translation, scale and rotation

void 
calculateTransforms(boolean recursive)
Calculates the local and world transform of this node and optionally all its children.

Matrix4 
calculateWorldTransform()
Calculates the world transform; the product of local transform and the parent's world transform.

Node 
copy()
Creates a nested copy of this Node, any child nodes are copied using this method as well.

void 
detach()
Removes this node from its current parent, if any.

BoundingBox 
extendBoundingBox(BoundingBox out)
Extends the bounding box with the bounds of this Node.

BoundingBox 
extendBoundingBox(BoundingBox out,
boolean transform)
Extends the bounding box with the bounds of this Node.

Node 
getChild(int index) 
Node 
getChild(java.lang.String id,
boolean recursive,
boolean ignoreCase) 
int 
getChildCount() 
java.lang.Iterable<Node> 
getChildren() 
static Node 
getNode(Array<Node> nodes,
java.lang.String id,
boolean recursive,
boolean ignoreCase)
Helper method to recursive fetch a node from an array

Node 
getParent() 
boolean 
hasChildren() 
boolean 
hasParent() 
<T extends Node> 
insertChild(int index,
T child)
Insert the specified node as child of this node at the specified index.

<T extends Node> 
insertChildren(int index,
java.lang.Iterable<T> nodes)
Insert the specified nodes as children of this node at the specified index.

<T extends Node> 
removeChild(T child)
Removes the specified node as child of this node.

protected Node 
set(Node other)
Creates a nested copy of this Node, any child nodes are copied using the
copy() method. 
public java.lang.String id
public boolean inheritTransform
globalTransform
will be the same as the value of localTransform
causing the transform to be independent
of its parent transform.public boolean isAnimated
public final Vector3 translation
public final Quaternion rotation
public final Vector3 scale
public final Matrix4 localTransform
calculateLocalTransform()
) or any applied animationpublic final Matrix4 globalTransform
calculateWorldTransform()
protected Node parent
public Matrix4 calculateLocalTransform()
public Matrix4 calculateWorldTransform()
public void calculateTransforms(boolean recursive)
recursive
 whether to calculate the local/world transforms for children.public void calculateBoneTransforms(boolean recursive)
public BoundingBox calculateBoundingBox(BoundingBox out)
public BoundingBox calculateBoundingBox(BoundingBox out, boolean transform)
public BoundingBox extendBoundingBox(BoundingBox out)
public BoundingBox extendBoundingBox(BoundingBox out, boolean transform)
public <T extends Node> void attachTo(T parent)
parent.addChild(this)
parent
 The Node to attach this Node to.public void detach()
this.getParent().removeChild(this)
public boolean hasChildren()
public int getChildCount()
getChild(int)
public Node getChild(int index)
index
 The zerobased index of the child node to get, must be: 0 <= index < getChildCount()
.public Node getChild(java.lang.String id, boolean recursive, boolean ignoreCase)
recursive
 false to fetch a root child only, true to search the entire node tree for the specified node.public <T extends Node> int addChild(T child)
child
 The Node to add as child of this Nodepublic <T extends Node> int addChildren(java.lang.Iterable<T> nodes)
nodes
 The Node to add as child of this Nodepublic <T extends Node> int insertChild(int index, T child)
getChildCount()
then the Node is added as the currently last child.index
 The zerobased index at which to add the childchild
 The Node to add as child of this Nodepublic <T extends Node> int insertChildren(int index, java.lang.Iterable<T> nodes)
getChildCount()
then the Node is added as the currently last child.index
 The zerobased index at which to add the childnodes
 The nodes to add as child of this Nodepublic <T extends Node> boolean removeChild(T child)
getParent()
method will return null). If the specified node currently isn't a child of this node then the removal
is considered to be unsuccessful and the method will return false.child
 The child node to remove.public java.lang.Iterable<Node> getChildren()
Iterable
to all child nodes that this node contains.public Node getParent()
public boolean hasParent()
public Node copy()
parts
are copied
using the 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
set(Node)
method as well.protected Node set(Node other)
copy()
method. This will detach this node
from its parent, but does not attach it to the parent of node being copied. The parts
are copied using the
NodePart.copy()
method. Note that that method copies the material and nodes (bones) by reference. If you intend to
use this node 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 copy any additional fields you've added.public static Node getNode(Array<Node> nodes, java.lang.String id, boolean recursive, boolean ignoreCase)
recursive
 false to fetch a root node only, true to search the entire node tree for the specified node.