Record Class CachedMultiResolutionMesh

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.mrm.CachedMultiResolutionMesh
All Implemented Interfaces:
CacheableObject<CachedMultiResolutionMesh>, MultiResolutionMesh

public record CachedMultiResolutionMesh(@NotNull Vec3f @NotNull [] positions, @NotNull Vec3f[] normals, @NotNull List<@NotNull MultiResolutionSubMesh> subMeshes, @NotNull List<@NotNull Material> materials, boolean alphaTest, @NotNull AxisAlignedBoundingBox bbox, @Nullable OrientedBoundingBox orientedBbox) extends Record implements MultiResolutionMesh
  • Constructor Details

    • CachedMultiResolutionMesh

      public CachedMultiResolutionMesh(@NotNull @NotNull Vec3f @NotNull [] positions, @NotNull @NotNull Vec3f[] normals, @NotNull @NotNull List<@NotNull MultiResolutionSubMesh> subMeshes, @NotNull @NotNull List<@NotNull Material> materials, boolean alphaTest, @NotNull @NotNull AxisAlignedBoundingBox bbox, @Nullable @Nullable OrientedBoundingBox orientedBbox)
      Creates an instance of a CachedMultiResolutionMesh record class.
      Parameters:
      positions - the value for the positions record component
      normals - the value for the normals record component
      subMeshes - the value for the subMeshes record component
      materials - the value for the materials record component
      alphaTest - the value for the alphaTest record component
      bbox - the value for the bbox record component
      orientedBbox - the value for the orientedBbox record component
  • Method Details

    • subMeshCount

      public long subMeshCount()
      Specified by:
      subMeshCount in interface MultiResolutionMesh
    • subMesh

      @Nullable public @Nullable MultiResolutionSubMesh subMesh(long i)
      Specified by:
      subMesh in interface MultiResolutionMesh
    • materialCount

      public long materialCount()
      Specified by:
      materialCount in interface MultiResolutionMesh
    • material

      @Nullable public @Nullable Material material(long i)
      Specified by:
      material in interface MultiResolutionMesh
    • cache

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

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

      @NotNull public @NotNull Vec3f @NotNull [] positions()
      Returns the value of the positions record component.
      Specified by:
      positions in interface MultiResolutionMesh
      Returns:
      the value of the positions record component
    • normals

      @NotNull public @NotNull Vec3f[] normals()
      Returns the value of the normals record component.
      Specified by:
      normals in interface MultiResolutionMesh
      Returns:
      the value of the normals record component
    • subMeshes

      @NotNull public @NotNull List<@NotNull MultiResolutionSubMesh> subMeshes()
      Returns the value of the subMeshes record component.
      Specified by:
      subMeshes in interface MultiResolutionMesh
      Returns:
      the value of the subMeshes record component
    • materials

      @NotNull public @NotNull List<@NotNull Material> materials()
      Returns the value of the materials record component.
      Specified by:
      materials in interface MultiResolutionMesh
      Returns:
      the value of the materials record component
    • alphaTest

      public boolean alphaTest()
      Returns the value of the alphaTest record component.
      Specified by:
      alphaTest in interface MultiResolutionMesh
      Returns:
      the value of the alphaTest record component
    • bbox

      @NotNull public @NotNull AxisAlignedBoundingBox bbox()
      Returns the value of the bbox record component.
      Specified by:
      bbox in interface MultiResolutionMesh
      Returns:
      the value of the bbox record component
    • orientedBbox

      @Nullable public @Nullable OrientedBoundingBox orientedBbox()
      Returns the value of the orientedBbox record component.
      Specified by:
      orientedBbox in interface MultiResolutionMesh
      Returns:
      the value of the orientedBbox record component