Record Class CachedPolygon

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.msh.CachedPolygon
All Implemented Interfaces:
CacheableObject<CachedPolygon>, Polygon

public record CachedPolygon(int materialIndex, int lightMapIndex, int @NotNull [] positionIndices, int @NotNull [] polygonIndices, boolean portal, boolean occluder, boolean sector, boolean shouldRelight, boolean outdoor, boolean ghostOccluder, boolean dynamicallyLit, boolean lod, byte normalAxis, short sectorIndex) extends Record implements Polygon
  • Constructor Summary

    Constructors
    Constructor
    Description
    CachedPolygon(int materialIndex, int lightMapIndex, int @NotNull [] positionIndices, int @NotNull [] polygonIndices, boolean portal, boolean occluder, boolean sector, boolean shouldRelight, boolean outdoor, boolean ghostOccluder, boolean dynamicallyLit, boolean lod, byte normalAxis, short sectorIndex)
    Creates an instance of a CachedPolygon record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull CachedPolygon
     
    boolean
    Returns the value of the dynamicallyLit record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the ghostOccluder record component.
    final int
    Returns a hash code value for this object.
    boolean
     
    int
    Returns the value of the lightMapIndex record component.
    boolean
    lod()
    Returns the value of the lod record component.
    int
    Returns the value of the materialIndex record component.
    byte
    Returns the value of the normalAxis record component.
    boolean
    Returns the value of the occluder record component.
    boolean
    Returns the value of the outdoor record component.
    int @NotNull []
    Returns the value of the polygonIndices record component.
    boolean
    Returns the value of the portal record component.
    int @NotNull []
    Returns the value of the positionIndices record component.
    boolean
    Returns the value of the sector record component.
    short
    Returns the value of the sectorIndex record component.
    boolean
    Returns the value of the shouldRelight record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CachedPolygon

      public CachedPolygon(int materialIndex, int lightMapIndex, int @NotNull [] positionIndices, int @NotNull [] polygonIndices, boolean portal, boolean occluder, boolean sector, boolean shouldRelight, boolean outdoor, boolean ghostOccluder, boolean dynamicallyLit, boolean lod, byte normalAxis, short sectorIndex)
      Creates an instance of a CachedPolygon record class.
      Parameters:
      materialIndex - the value for the materialIndex record component
      lightMapIndex - the value for the lightMapIndex record component
      positionIndices - the value for the positionIndices record component
      polygonIndices - the value for the polygonIndices record component
      portal - the value for the portal record component
      occluder - the value for the occluder record component
      sector - the value for the sector record component
      shouldRelight - the value for the shouldRelight record component
      outdoor - the value for the outdoor record component
      ghostOccluder - the value for the ghostOccluder record component
      dynamicallyLit - the value for the dynamicallyLit record component
      lod - the value for the lod record component
      normalAxis - the value for the normalAxis record component
      sectorIndex - the value for the sectorIndex record component
  • Method Details

    • cache

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

      public boolean isCached()
      Specified by:
      isCached in interface CacheableObject<CachedPolygon>
    • 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.
    • materialIndex

      public int materialIndex()
      Returns the value of the materialIndex record component.
      Specified by:
      materialIndex in interface Polygon
      Returns:
      the value of the materialIndex record component
    • lightMapIndex

      public int lightMapIndex()
      Returns the value of the lightMapIndex record component.
      Specified by:
      lightMapIndex in interface Polygon
      Returns:
      the value of the lightMapIndex record component
    • positionIndices

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

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

      public boolean portal()
      Returns the value of the portal record component.
      Specified by:
      portal in interface Polygon
      Returns:
      the value of the portal record component
    • occluder

      public boolean occluder()
      Returns the value of the occluder record component.
      Specified by:
      occluder in interface Polygon
      Returns:
      the value of the occluder record component
    • sector

      public boolean sector()
      Returns the value of the sector record component.
      Specified by:
      sector in interface Polygon
      Returns:
      the value of the sector record component
    • shouldRelight

      public boolean shouldRelight()
      Returns the value of the shouldRelight record component.
      Specified by:
      shouldRelight in interface Polygon
      Returns:
      the value of the shouldRelight record component
    • outdoor

      public boolean outdoor()
      Returns the value of the outdoor record component.
      Specified by:
      outdoor in interface Polygon
      Returns:
      the value of the outdoor record component
    • ghostOccluder

      public boolean ghostOccluder()
      Returns the value of the ghostOccluder record component.
      Specified by:
      ghostOccluder in interface Polygon
      Returns:
      the value of the ghostOccluder record component
    • dynamicallyLit

      public boolean dynamicallyLit()
      Returns the value of the dynamicallyLit record component.
      Specified by:
      dynamicallyLit in interface Polygon
      Returns:
      the value of the dynamicallyLit record component
    • lod

      public boolean lod()
      Returns the value of the lod record component.
      Specified by:
      lod in interface Polygon
      Returns:
      the value of the lod record component
    • normalAxis

      public byte normalAxis()
      Returns the value of the normalAxis record component.
      Specified by:
      normalAxis in interface Polygon
      Returns:
      the value of the normalAxis record component
    • sectorIndex

      public short sectorIndex()
      Returns the value of the sectorIndex record component.
      Specified by:
      sectorIndex in interface Polygon
      Returns:
      the value of the sectorIndex record component