Interface StageNode3D
- All Superinterfaces:
StageNode
- All Known Subinterfaces:
Mesh
Nodes have two different "transforms", which determines how and where they are drawn by the renderer. The local transform is interpreted relative to its parent node. Combining a node's local transform with the transform of its parent results in its global transform, which is interpreted relative to the stage.
Nodes do not implement the Updatable
interface. Nodes are not expected to be updated every frame: The
renderer will generally not draw graphics that are not currently visible,
for performance reasons. Therefore, instead of relying on frame updates,
the renderer will use StageNode.animate(Timer) to update currently
visible nodes while rendering the stage.
Although the stage can contain both 2D and 3D graphics, it has a hard
separation between the two. Refer to StageNode2D for the equivalent
interface for 2D graphics.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voiddetach()Detaches this node from its parent, removing it from the stage.Returns this node's global transform, which is interpreted relative to the stage.@Nullable GroupReturns this node's parent node.Returns this node's local transform, which is interpreted relative to its parent node.
-
Method Details
-
getParent
-
detach
-
getTransform
Transform3D getTransform()Returns this node's local transform, which is interpreted relative to its parent node. The local transform can be modified by application code to modify how and where the node is displayed. -
getGlobalTransform
Transform3D getGlobalTransform()Returns this node's global transform, which is interpreted relative to the stage. The global transform is updated by the renderer when drawing the stage at the end of frame updates. Recalculating the global transform is relatively expensive, and is therefore only done once per frame. This means that any changes made to a node's local transform since the last frame update may not yet been reflected in the current state of its global transform.
-