|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.graphics.g3d.model.Node
public class Node
A node is part of a hierarchy of Nodes in a Model
. A Node encodes
a transform relative to its parents. A Node can have child nodes. Optionally
a node can specify a MeshPart
and a Material
to be applied to the mesh part.
Field Summary | |
---|---|
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 Summary | |
---|---|
Node()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public String id
public Node parent
public final Array<Node> children
public boolean isAnimated
public final Vector3 translation
public final Quaternion rotation
public final Vector3 scale
public final Matrix4 localTransform
calculateLocalTransform()
) or any applied animation
public final Matrix4 globalTransform
calculateWorldTransform()
public Array<NodePart> parts
Constructor Detail |
---|
public Node()
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |