Record Class CachedLightMap

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

public record CachedLightMap(@NotNull Texture image, @NotNull Vec3f origin, @NotNull Vec3f @NotNull [] normals) extends Record implements LightMap
  • Constructor Summary

    Constructors
    Constructor
    Description
    CachedLightMap(@NotNull Texture image, @NotNull Vec3f origin, @NotNull Vec3f @NotNull [] normals)
    Creates an instance of a CachedLightMap record class.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotNull Texture
    Returns the value of the image record component.
    boolean
     
    @NotNull Vec3f @NotNull []
    Returns the value of the normals record component.
    @NotNull Vec3f
    Returns the value of the origin 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

    • CachedLightMap

      public CachedLightMap(@NotNull @NotNull Texture image, @NotNull @NotNull Vec3f origin, @NotNull @NotNull Vec3f @NotNull [] normals)
      Creates an instance of a CachedLightMap record class.
      Parameters:
      image - the value for the image record component
      origin - the value for the origin record component
      normals - the value for the normals record component
  • Method Details

    • cache

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

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

      @NotNull public @NotNull Texture image()
      Returns the value of the image record component.
      Specified by:
      image in interface LightMap
      Returns:
      the value of the image record component
    • origin

      @NotNull public @NotNull Vec3f origin()
      Returns the value of the origin record component.
      Specified by:
      origin in interface LightMap
      Returns:
      the value of the origin record component
    • normals

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