Record Class SceneSelection

java.lang.Object
java.lang.Record
ke.ric.renderer.api.SceneSelection
Record Components:
includeBlocks - whether existing block geometry is retained (false retains known-air evidence)
entities - non-null captured/caller-supplied entity category to retain

public record SceneSelection(boolean includeBlocks, SceneSelection.EntityMode entities) extends Record
Selects evidence retained in an immutable scene derivative. Selection only removes evidence; deriving again cannot restore blocks or entities removed from an earlier scene. Requires a matching development provider implementing RendererClient.deriveScene(ke.ric.renderer.api.Scene, ke.ric.renderer.api.SceneSelection); older providers reject it.
  • Constructor Details

    • SceneSelection

      public SceneSelection(boolean includeBlocks, SceneSelection.EntityMode entities)
      Creates an instance of a SceneSelection record class.
      Parameters:
      includeBlocks - the value for the includeBlocks record component
      entities - the value for the entities record component
  • Method Details

    • all

      public static SceneSelection all()
      Retains all block and entity evidence already present in the source.
    • entitiesOnly

      public static SceneSelection entitiesOnly()
      Removes block geometry and retains all existing entities, including nonliving ones.
    • livingEntitiesOnly

      public static SceneSelection livingEntitiesOnly()
      Removes block geometry and retains only entities already marked living.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • includeBlocks

      public boolean includeBlocks()
      Returns the value of the includeBlocks record component.
      Returns:
      the value of the includeBlocks record component
    • entities

      public SceneSelection.EntityMode entities()
      Returns the value of the entities record component.
      Returns:
      the value of the entities record component