Interface StageNode

All Known Subinterfaces:
Mesh, StageNode2D, StageNode3D
All Known Implementing Classes:
Container, Group, Light, Primitive, Sprite, Text

public interface StageNode
Base interface for all graphics that can be added to the stage. Depending on the renderer, the stage can contain both 2D and 3D graphics, which are represented by StageNode2D and StageNode3D, respectively.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    animate(Timer animationTimer)
    Called by the renderer at the end of frame updates, while rendering the stage.
    void
    Detaches this node from its parent, removing it from the stage.
    @Nullable StageNode
    Returns this node's parent node.
  • Method Details

    • animate

      void animate(Timer animationTimer)
      Called by the renderer at the end of frame updates, while rendering the stage. animationTimer contains the elapsed time since the currently active scene was started. This allows animations to display correctly, without the need to update every single node during each frame update.
    • getParent

      @Nullable StageNode getParent()
      Returns this node's parent node. Returns null if thos node does not have a parent, or if this is the root node.
    • detach

      void detach()
      Detaches this node from its parent, removing it from the stage. Does nothing if this node does not have a parent.