Record Class CachedBinarySpacePartitionTree

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.bsp.CachedBinarySpacePartitionTree
All Implemented Interfaces:
BinarySpacePartitionTree, CacheableObject<CachedBinarySpacePartitionTree>

public record CachedBinarySpacePartitionTree(@NotNull BinarySpacePartitionType type, int @NotNull [] polygonIndices, int @NotNull [] leafPolygonIndices, int @NotNull [] portalPolygonIndices, @NotNull Vec3f @NotNull [] lightPoints, long @NotNull [] leafNodeIndices, @NotNull BinarySpacePartitionNode @NotNull [] nodes, @NotNull List<@NotNull BinarySpacePartitionSector> sectors) extends Record implements BinarySpacePartitionTree
  • Constructor Details

    • CachedBinarySpacePartitionTree

      public CachedBinarySpacePartitionTree(@NotNull @NotNull BinarySpacePartitionType type, int @NotNull [] polygonIndices, int @NotNull [] leafPolygonIndices, int @NotNull [] portalPolygonIndices, @NotNull @NotNull Vec3f @NotNull [] lightPoints, long @NotNull [] leafNodeIndices, @NotNull @NotNull BinarySpacePartitionNode @NotNull [] nodes, @NotNull @NotNull List<@NotNull BinarySpacePartitionSector> sectors)
      Creates an instance of a CachedBinarySpacePartitionTree record class.
      Parameters:
      type - the value for the type record component
      polygonIndices - the value for the polygonIndices record component
      leafPolygonIndices - the value for the leafPolygonIndices record component
      portalPolygonIndices - the value for the portalPolygonIndices record component
      lightPoints - the value for the lightPoints record component
      leafNodeIndices - the value for the leafNodeIndices record component
      nodes - the value for the nodes record component
      sectors - the value for the sectors record component
  • Method Details

    • lightPoints

      @NotNull public @NotNull Vec3f @NotNull [] lightPoints()
      Returns the value of the lightPoints record component.
      Specified by:
      lightPoints in interface BinarySpacePartitionTree
      Returns:
      the value of the lightPoints record component
    • sectorCount

      public long sectorCount()
      Specified by:
      sectorCount in interface BinarySpacePartitionTree
    • sector

      @Nullable public @Nullable BinarySpacePartitionSector sector(long i)
      Specified by:
      sector in interface BinarySpacePartitionTree
    • cache

      @NotNull public @NotNull CachedBinarySpacePartitionTree cache()
      Specified by:
      cache in interface CacheableObject<CachedBinarySpacePartitionTree>
    • isCached

      public boolean isCached()
      Specified by:
      isCached in interface CacheableObject<CachedBinarySpacePartitionTree>
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • type

      @NotNull public @NotNull BinarySpacePartitionType type()
      Returns the value of the type record component.
      Specified by:
      type in interface BinarySpacePartitionTree
      Returns:
      the value of the type record component
    • polygonIndices

      public int @NotNull [] polygonIndices()
      Returns the value of the polygonIndices record component.
      Specified by:
      polygonIndices in interface BinarySpacePartitionTree
      Returns:
      the value of the polygonIndices record component
    • leafPolygonIndices

      public int @NotNull [] leafPolygonIndices()
      Returns the value of the leafPolygonIndices record component.
      Specified by:
      leafPolygonIndices in interface BinarySpacePartitionTree
      Returns:
      the value of the leafPolygonIndices record component
    • portalPolygonIndices

      public int @NotNull [] portalPolygonIndices()
      Returns the value of the portalPolygonIndices record component.
      Specified by:
      portalPolygonIndices in interface BinarySpacePartitionTree
      Returns:
      the value of the portalPolygonIndices record component
    • leafNodeIndices

      public long @NotNull [] leafNodeIndices()
      Returns the value of the leafNodeIndices record component.
      Specified by:
      leafNodeIndices in interface BinarySpacePartitionTree
      Returns:
      the value of the leafNodeIndices record component
    • nodes

      @NotNull public @NotNull BinarySpacePartitionNode @NotNull [] nodes()
      Returns the value of the nodes record component.
      Specified by:
      nodes in interface BinarySpacePartitionTree
      Returns:
      the value of the nodes record component
    • sectors

      @NotNull public @NotNull List<@NotNull BinarySpacePartitionSector> sectors()
      Returns the value of the sectors record component.
      Specified by:
      sectors in interface BinarySpacePartitionTree
      Returns:
      the value of the sectors record component