Record Class CachedMaterial

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.mat.CachedMaterial
All Implemented Interfaces:
CacheableObject<CachedMaterial>, Material

public record CachedMaterial(@NotNull String name, @NotNull MaterialGroup group, @NotNull Color color, float smoothAngle, @NotNull String texture, @NotNull Vec2f textureScale, float textureAnimationFps, @NotNull AnimationMapping textureAnimationMapping, @NotNull Vec2f textureAnimationMappingDirection, boolean disableCollision, boolean disableLightmap, boolean dontCollapse, @NotNull String detailObject, float detailObjectScale, boolean forceOccluder, boolean environmentMapping, float environmentMappingStrength, @NotNull WaveMode waveMode, @NotNull WaveSpeed waveSpeed, float waveAmplitude, float waveGridSize, boolean ignoreSun, @NotNull AlphaFunction alphaFunction, @NotNull Vec2f defaultMapping) extends Record implements Material
  • Constructor Summary

    Constructors
    Constructor
    Description
    CachedMaterial(@NotNull String name, @NotNull MaterialGroup group, @NotNull Color color, float smoothAngle, @NotNull String texture, @NotNull Vec2f textureScale, float textureAnimationFps, @NotNull AnimationMapping textureAnimationMapping, @NotNull Vec2f textureAnimationMappingDirection, boolean disableCollision, boolean disableLightmap, boolean dontCollapse, @NotNull String detailObject, float detailObjectScale, boolean forceOccluder, boolean environmentMapping, float environmentMappingStrength, @NotNull WaveMode waveMode, @NotNull WaveSpeed waveSpeed, float waveAmplitude, float waveGridSize, boolean ignoreSun, @NotNull AlphaFunction alphaFunction, @NotNull Vec2f defaultMapping)
    Creates an instance of a CachedMaterial record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull AlphaFunction
    Returns the value of the alphaFunction record component.
     
    @NotNull Color
    Returns the value of the color record component.
    @NotNull Vec2f
    Returns the value of the defaultMapping record component.
    @NotNull String
    Returns the value of the detailObject record component.
    float
    Returns the value of the detailObjectScale record component.
    boolean
    Returns the value of the disableCollision record component.
    boolean
    Returns the value of the disableLightmap record component.
    boolean
    Returns the value of the dontCollapse record component.
    boolean
    Returns the value of the environmentMapping record component.
    float
    Returns the value of the environmentMappingStrength record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the forceOccluder record component.
    @NotNull MaterialGroup
    Returns the value of the group record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the ignoreSun record component.
    boolean
     
    @NotNull String
    Returns the value of the name record component.
    float
    Returns the value of the smoothAngle record component.
    @NotNull String
    Returns the value of the texture record component.
    float
    Returns the value of the textureAnimationFps record component.
    Returns the value of the textureAnimationMapping record component.
    @NotNull Vec2f
    Returns the value of the textureAnimationMappingDirection record component.
    @NotNull Vec2f
    Returns the value of the textureScale record component.
    final String
    Returns a string representation of this record class.
    float
    Returns the value of the waveAmplitude record component.
    float
    Returns the value of the waveGridSize record component.
    @NotNull WaveMode
    Returns the value of the waveMode record component.
    @NotNull WaveSpeed
    Returns the value of the waveSpeed record component.

    Methods inherited from class java.lang.Object

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

    • CachedMaterial

      public CachedMaterial(@NotNull @NotNull String name, @NotNull @NotNull MaterialGroup group, @NotNull @NotNull Color color, float smoothAngle, @NotNull @NotNull String texture, @NotNull @NotNull Vec2f textureScale, float textureAnimationFps, @NotNull @NotNull AnimationMapping textureAnimationMapping, @NotNull @NotNull Vec2f textureAnimationMappingDirection, boolean disableCollision, boolean disableLightmap, boolean dontCollapse, @NotNull @NotNull String detailObject, float detailObjectScale, boolean forceOccluder, boolean environmentMapping, float environmentMappingStrength, @NotNull @NotNull WaveMode waveMode, @NotNull @NotNull WaveSpeed waveSpeed, float waveAmplitude, float waveGridSize, boolean ignoreSun, @NotNull @NotNull AlphaFunction alphaFunction, @NotNull @NotNull Vec2f defaultMapping)
      Creates an instance of a CachedMaterial record class.
      Parameters:
      name - the value for the name record component
      group - the value for the group record component
      color - the value for the color record component
      smoothAngle - the value for the smoothAngle record component
      texture - the value for the texture record component
      textureScale - the value for the textureScale record component
      textureAnimationFps - the value for the textureAnimationFps record component
      textureAnimationMapping - the value for the textureAnimationMapping record component
      textureAnimationMappingDirection - the value for the textureAnimationMappingDirection record component
      disableCollision - the value for the disableCollision record component
      disableLightmap - the value for the disableLightmap record component
      dontCollapse - the value for the dontCollapse record component
      detailObject - the value for the detailObject record component
      detailObjectScale - the value for the detailObjectScale record component
      forceOccluder - the value for the forceOccluder record component
      environmentMapping - the value for the environmentMapping record component
      environmentMappingStrength - the value for the environmentMappingStrength record component
      waveMode - the value for the waveMode record component
      waveSpeed - the value for the waveSpeed record component
      waveAmplitude - the value for the waveAmplitude record component
      waveGridSize - the value for the waveGridSize record component
      ignoreSun - the value for the ignoreSun record component
      alphaFunction - the value for the alphaFunction record component
      defaultMapping - the value for the defaultMapping record component
  • Method Details

    • cache

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

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

      @NotNull public @NotNull String name()
      Returns the value of the name record component.
      Specified by:
      name in interface Material
      Returns:
      the value of the name record component
    • group

      @NotNull public @NotNull MaterialGroup group()
      Returns the value of the group record component.
      Specified by:
      group in interface Material
      Returns:
      the value of the group record component
    • color

      @NotNull public @NotNull Color color()
      Returns the value of the color record component.
      Specified by:
      color in interface Material
      Returns:
      the value of the color record component
    • smoothAngle

      public float smoothAngle()
      Returns the value of the smoothAngle record component.
      Specified by:
      smoothAngle in interface Material
      Returns:
      the value of the smoothAngle record component
    • texture

      @NotNull public @NotNull String texture()
      Returns the value of the texture record component.
      Specified by:
      texture in interface Material
      Returns:
      the value of the texture record component
    • textureScale

      @NotNull public @NotNull Vec2f textureScale()
      Returns the value of the textureScale record component.
      Specified by:
      textureScale in interface Material
      Returns:
      the value of the textureScale record component
    • textureAnimationFps

      public float textureAnimationFps()
      Returns the value of the textureAnimationFps record component.
      Specified by:
      textureAnimationFps in interface Material
      Returns:
      the value of the textureAnimationFps record component
    • textureAnimationMapping

      @NotNull public @NotNull AnimationMapping textureAnimationMapping()
      Returns the value of the textureAnimationMapping record component.
      Specified by:
      textureAnimationMapping in interface Material
      Returns:
      the value of the textureAnimationMapping record component
    • textureAnimationMappingDirection

      @NotNull public @NotNull Vec2f textureAnimationMappingDirection()
      Returns the value of the textureAnimationMappingDirection record component.
      Specified by:
      textureAnimationMappingDirection in interface Material
      Returns:
      the value of the textureAnimationMappingDirection record component
    • disableCollision

      public boolean disableCollision()
      Returns the value of the disableCollision record component.
      Specified by:
      disableCollision in interface Material
      Returns:
      the value of the disableCollision record component
    • disableLightmap

      public boolean disableLightmap()
      Returns the value of the disableLightmap record component.
      Specified by:
      disableLightmap in interface Material
      Returns:
      the value of the disableLightmap record component
    • dontCollapse

      public boolean dontCollapse()
      Returns the value of the dontCollapse record component.
      Specified by:
      dontCollapse in interface Material
      Returns:
      the value of the dontCollapse record component
    • detailObject

      @NotNull public @NotNull String detailObject()
      Returns the value of the detailObject record component.
      Specified by:
      detailObject in interface Material
      Returns:
      the value of the detailObject record component
    • detailObjectScale

      public float detailObjectScale()
      Returns the value of the detailObjectScale record component.
      Specified by:
      detailObjectScale in interface Material
      Returns:
      the value of the detailObjectScale record component
    • forceOccluder

      public boolean forceOccluder()
      Returns the value of the forceOccluder record component.
      Specified by:
      forceOccluder in interface Material
      Returns:
      the value of the forceOccluder record component
    • environmentMapping

      public boolean environmentMapping()
      Returns the value of the environmentMapping record component.
      Specified by:
      environmentMapping in interface Material
      Returns:
      the value of the environmentMapping record component
    • environmentMappingStrength

      public float environmentMappingStrength()
      Returns the value of the environmentMappingStrength record component.
      Specified by:
      environmentMappingStrength in interface Material
      Returns:
      the value of the environmentMappingStrength record component
    • waveMode

      @NotNull public @NotNull WaveMode waveMode()
      Returns the value of the waveMode record component.
      Specified by:
      waveMode in interface Material
      Returns:
      the value of the waveMode record component
    • waveSpeed

      @NotNull public @NotNull WaveSpeed waveSpeed()
      Returns the value of the waveSpeed record component.
      Specified by:
      waveSpeed in interface Material
      Returns:
      the value of the waveSpeed record component
    • waveAmplitude

      public float waveAmplitude()
      Returns the value of the waveAmplitude record component.
      Specified by:
      waveAmplitude in interface Material
      Returns:
      the value of the waveAmplitude record component
    • waveGridSize

      public float waveGridSize()
      Returns the value of the waveGridSize record component.
      Specified by:
      waveGridSize in interface Material
      Returns:
      the value of the waveGridSize record component
    • ignoreSun

      public boolean ignoreSun()
      Returns the value of the ignoreSun record component.
      Specified by:
      ignoreSun in interface Material
      Returns:
      the value of the ignoreSun record component
    • alphaFunction

      @NotNull public @NotNull AlphaFunction alphaFunction()
      Returns the value of the alphaFunction record component.
      Specified by:
      alphaFunction in interface Material
      Returns:
      the value of the alphaFunction record component
    • defaultMapping

      @NotNull public @NotNull Vec2f defaultMapping()
      Returns the value of the defaultMapping record component.
      Specified by:
      defaultMapping in interface Material
      Returns:
      the value of the defaultMapping record component