Interface ModelOutliner

All Known Implementing Classes:
ModelOutliner.Reference, ModelOutliner.Tree

@Internal public sealed interface ModelOutliner permits ModelOutliner.Reference, ModelOutliner.Tree
Represents the hierarchical structure (outliner) of a model.

The outliner defines the parent-child relationships between groups and elements (cubes, locators, etc.). It can be either a direct reference to an element (UUID string) or a tree node (Group) containing children.

Since:
1.15.2
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Represents a leaf node in the outliner, referencing a specific element by UUID.
    static final record 
    Represents a branch node (Group) in the outliner, containing child nodes.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.google.gson.JsonDeserializer<ModelOutliner>
    A JSON deserializer that parses the outliner structure.
  • Method Summary

    Modifier and Type
    Method
    Description
    Flattens the outliner tree into a stream of all nodes.
    toBlueprint(@NotNull ModelLoadContext context)
    Converts this outliner node into a processed BlueprintElement.
    @NotNull String
    Returns the UUID of this outliner node.
  • Field Details

    • PARSER

      static final com.google.gson.JsonDeserializer<ModelOutliner> PARSER
      A JSON deserializer that parses the outliner structure.

      It distinguishes between leaf nodes (UUID strings) and branch nodes (Groups with children).

      Since:
      1.15.2
  • Method Details

    • toBlueprint

      @NotNull @NotNull BlueprintElement toBlueprint(@NotNull @NotNull ModelLoadContext context)
      Converts this outliner node into a processed BlueprintElement.
      Parameters:
      context - the model loading context
      Returns:
      the blueprint element
      Since:
      1.15.2
    • flatten

      @NotNull @NotNull Stream<ModelOutliner> flatten()
      Flattens the outliner tree into a stream of all nodes.
      Returns:
      a stream of all outliner nodes
      Since:
      1.15.2
    • uuid

      @NotNull @NotNull String uuid()
      Returns the UUID of this outliner node.
      Returns:
      the UUID string
      Since:
      1.15.2