Modifier and Type | Field and Description |
---|---|
Array<Node> |
children
child nodes
|
Matrix4 |
globalTransform
the global transform, product of local transform and transform of the parent node, calculated via
calculateWorldTransform() |
String |
id
the id, may be null, FIXME is this unique?
|
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 |
Node |
parent
parent node, may be null
|
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 |
---|---|
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.
|
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(String id,
boolean recursive,
boolean ignoreCase) |
static Node |
getNode(Array<Node> nodes,
String id,
boolean recursive,
boolean ignoreCase)
Helper method to recursive fetch a node from an array
|
public String id
public Node parent
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()
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 Node getChild(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 static Node getNode(Array<Node> nodes, 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.Copyright © 2014. All rights reserved.