Package dev.gothickit.zenkit.mat
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
ConstructorsConstructorDescriptionCachedMaterial(@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 aCachedMaterialrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull AlphaFunctionReturns the value of thealphaFunctionrecord component.@NotNull CachedMaterialcache()@NotNull Colorcolor()Returns the value of thecolorrecord component.@NotNull Vec2fReturns the value of thedefaultMappingrecord component.@NotNull StringReturns the value of thedetailObjectrecord component.floatReturns the value of thedetailObjectScalerecord component.booleanReturns the value of thedisableCollisionrecord component.booleanReturns the value of thedisableLightmaprecord component.booleanReturns the value of thedontCollapserecord component.booleanReturns the value of theenvironmentMappingrecord component.floatReturns the value of theenvironmentMappingStrengthrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforceOccluderrecord component.@NotNull MaterialGroupgroup()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theignoreSunrecord component.booleanisCached()@NotNull Stringname()Returns the value of thenamerecord component.floatReturns the value of thesmoothAnglerecord component.@NotNull Stringtexture()Returns the value of thetexturerecord component.floatReturns the value of thetextureAnimationFpsrecord component.@NotNull AnimationMappingReturns the value of thetextureAnimationMappingrecord component.@NotNull Vec2fReturns the value of thetextureAnimationMappingDirectionrecord component.@NotNull Vec2fReturns the value of thetextureScalerecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thewaveAmplituderecord component.floatReturns the value of thewaveGridSizerecord component.@NotNull WaveModewaveMode()Returns the value of thewaveModerecord component.@NotNull WaveSpeedReturns the value of thewaveSpeedrecord component.
-
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 aCachedMaterialrecord class.- Parameters:
name- the value for thenamerecord componentgroup- the value for thegrouprecord componentcolor- the value for thecolorrecord componentsmoothAngle- the value for thesmoothAnglerecord componenttexture- the value for thetexturerecord componenttextureScale- the value for thetextureScalerecord componenttextureAnimationFps- the value for thetextureAnimationFpsrecord componenttextureAnimationMapping- the value for thetextureAnimationMappingrecord componenttextureAnimationMappingDirection- the value for thetextureAnimationMappingDirectionrecord componentdisableCollision- the value for thedisableCollisionrecord componentdisableLightmap- the value for thedisableLightmaprecord componentdontCollapse- the value for thedontCollapserecord componentdetailObject- the value for thedetailObjectrecord componentdetailObjectScale- the value for thedetailObjectScalerecord componentforceOccluder- the value for theforceOccluderrecord componentenvironmentMapping- the value for theenvironmentMappingrecord componentenvironmentMappingStrength- the value for theenvironmentMappingStrengthrecord componentwaveMode- the value for thewaveModerecord componentwaveSpeed- the value for thewaveSpeedrecord componentwaveAmplitude- the value for thewaveAmplituderecord componentwaveGridSize- the value for thewaveGridSizerecord componentignoreSun- the value for theignoreSunrecord componentalphaFunction- the value for thealphaFunctionrecord componentdefaultMapping- the value for thedefaultMappingrecord component
-
-
Method Details
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedMaterial>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedMaterial>
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component. -
group
Returns the value of thegrouprecord component. -
color
Returns the value of thecolorrecord component. -
smoothAngle
public float smoothAngle()Returns the value of thesmoothAnglerecord component.- Specified by:
smoothAnglein interfaceMaterial- Returns:
- the value of the
smoothAnglerecord component
-
texture
Returns the value of thetexturerecord component. -
textureScale
Returns the value of thetextureScalerecord component.- Specified by:
textureScalein interfaceMaterial- Returns:
- the value of the
textureScalerecord component
-
textureAnimationFps
public float textureAnimationFps()Returns the value of thetextureAnimationFpsrecord component.- Specified by:
textureAnimationFpsin interfaceMaterial- Returns:
- the value of the
textureAnimationFpsrecord component
-
textureAnimationMapping
Returns the value of thetextureAnimationMappingrecord component.- Specified by:
textureAnimationMappingin interfaceMaterial- Returns:
- the value of the
textureAnimationMappingrecord component
-
textureAnimationMappingDirection
Returns the value of thetextureAnimationMappingDirectionrecord component.- Specified by:
textureAnimationMappingDirectionin interfaceMaterial- Returns:
- the value of the
textureAnimationMappingDirectionrecord component
-
disableCollision
public boolean disableCollision()Returns the value of thedisableCollisionrecord component.- Specified by:
disableCollisionin interfaceMaterial- Returns:
- the value of the
disableCollisionrecord component
-
disableLightmap
public boolean disableLightmap()Returns the value of thedisableLightmaprecord component.- Specified by:
disableLightmapin interfaceMaterial- Returns:
- the value of the
disableLightmaprecord component
-
dontCollapse
public boolean dontCollapse()Returns the value of thedontCollapserecord component.- Specified by:
dontCollapsein interfaceMaterial- Returns:
- the value of the
dontCollapserecord component
-
detailObject
Returns the value of thedetailObjectrecord component.- Specified by:
detailObjectin interfaceMaterial- Returns:
- the value of the
detailObjectrecord component
-
detailObjectScale
public float detailObjectScale()Returns the value of thedetailObjectScalerecord component.- Specified by:
detailObjectScalein interfaceMaterial- Returns:
- the value of the
detailObjectScalerecord component
-
forceOccluder
public boolean forceOccluder()Returns the value of theforceOccluderrecord component.- Specified by:
forceOccluderin interfaceMaterial- Returns:
- the value of the
forceOccluderrecord component
-
environmentMapping
public boolean environmentMapping()Returns the value of theenvironmentMappingrecord component.- Specified by:
environmentMappingin interfaceMaterial- Returns:
- the value of the
environmentMappingrecord component
-
environmentMappingStrength
public float environmentMappingStrength()Returns the value of theenvironmentMappingStrengthrecord component.- Specified by:
environmentMappingStrengthin interfaceMaterial- Returns:
- the value of the
environmentMappingStrengthrecord component
-
waveMode
Returns the value of thewaveModerecord component. -
waveSpeed
Returns the value of thewaveSpeedrecord component. -
waveAmplitude
public float waveAmplitude()Returns the value of thewaveAmplituderecord component.- Specified by:
waveAmplitudein interfaceMaterial- Returns:
- the value of the
waveAmplituderecord component
-
waveGridSize
public float waveGridSize()Returns the value of thewaveGridSizerecord component.- Specified by:
waveGridSizein interfaceMaterial- Returns:
- the value of the
waveGridSizerecord component
-
ignoreSun
public boolean ignoreSun()Returns the value of theignoreSunrecord component. -
alphaFunction
Returns the value of thealphaFunctionrecord component.- Specified by:
alphaFunctionin interfaceMaterial- Returns:
- the value of the
alphaFunctionrecord component
-
defaultMapping
Returns the value of thedefaultMappingrecord component.- Specified by:
defaultMappingin interfaceMaterial- Returns:
- the value of the
defaultMappingrecord component
-