Class Node

java.lang.Object
limn.render3d.scene.Node
Direct Known Subclasses:
LightNode, MeshNode

public class Node extends Object
A node in the retained Scene3D graph: a local Transform3D plus children. Concrete payloads are MeshNode and LightNode; a plain Node is a transform group. World transforms are composed top-down during traversal (world = parentWorld ยท local) and cached: only subtrees whose transform changed since the last frame recompute, so a static scene does zero matrix math per frame.
  • Constructor Details

    • Node

      public Node()
  • Method Details

    • transform

      public Transform3D transform()
      This node's transform, relative to its parent.
    • transform

      public Node transform(Transform3D transform)
      Sets the transform relative to the parent, moving the whole subtree with it.
    • name

      public String name()
      An optional label, for debugging and for finding a node in a loaded model.
    • name

      public Node name(String name)
      Labels this node; purely informational.
    • children

      public List<Node> children()
      The live child list. Prefer add(N) for attaching: it marks the child dirty so its cached world matrix is recomposed under the new parent; moving an already-composed node in via this raw list keeps a stale world until its transform next changes.
    • add

      public <N extends Node> N add(N child)
      Adds a child and returns it (for fluent building).