Record Class VisibilityStatistics

java.lang.Object
java.lang.Record
ke.ric.renderer.api.VisibilityStatistics
Record Components:
entities - visible entity-key counts produced by this render
materials - visible material-key counts produced by this render
structures - visible structure-key counts produced by this render
biomes - visible biome-key counts produced by this render
skyPixels - number of pixels classified as sky
totalPixels - total number of frame pixels

public record VisibilityStatistics(Map<String,Integer> entities, Map<String,Integer> materials, Map<String,Integer> structures, Map<String,Integer> biomes, int skyPixels, int totalPixels) extends Record
Immutable counts of visible semantic evidence and covered pixels in a completed frame. Maps are defensive immutable snapshots.
  • Constructor Details

    • VisibilityStatistics

      public VisibilityStatistics(Map<String,Integer> entities, Map<String,Integer> materials, Map<String,Integer> structures, Map<String,Integer> biomes, int skyPixels, int totalPixels)
      Creates an instance of a VisibilityStatistics record class.
      Parameters:
      entities - the value for the entities record component
      materials - the value for the materials record component
      structures - the value for the structures record component
      biomes - the value for the biomes record component
      skyPixels - the value for the skyPixels record component
      totalPixels - the value for the totalPixels record component
  • Method Details

    • empty

      public static VisibilityStatistics empty(int pixels)
      Returns empty semantic maps and classifies all supplied frame pixels as sky.
    • 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.
    • entities

      public Map<String,Integer> entities()
      Returns the value of the entities record component.
      Returns:
      the value of the entities record component
    • materials

      public Map<String,Integer> materials()
      Returns the value of the materials record component.
      Returns:
      the value of the materials record component
    • structures

      public Map<String,Integer> structures()
      Returns the value of the structures record component.
      Returns:
      the value of the structures record component
    • biomes

      public Map<String,Integer> biomes()
      Returns the value of the biomes record component.
      Returns:
      the value of the biomes record component
    • skyPixels

      public int skyPixels()
      Returns the value of the skyPixels record component.
      Returns:
      the value of the skyPixels record component
    • totalPixels

      public int totalPixels()
      Returns the value of the totalPixels record component.
      Returns:
      the value of the totalPixels record component