Package dev.gothickit.zenkit.mrm
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 Summary
ConstructorsConstructorDescriptionCachedMultiResolutionMesh(@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) Creates an instance of aCachedMultiResolutionMeshrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thealphaTestrecord component.@NotNull AxisAlignedBoundingBoxbbox()Returns the value of thebboxrecord component.@NotNull CachedMultiResolutionMeshcache()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisCached()@Nullable Materialmaterial(long i) longReturns the value of thematerialsrecord component.@NotNull Vec3f[]normals()Returns the value of thenormalsrecord component.@Nullable OrientedBoundingBoxReturns the value of theorientedBboxrecord component.@NotNull Vec3f @NotNull []Returns the value of thepositionsrecord component.@Nullable MultiResolutionSubMeshsubMesh(long i) long@NotNull List<@NotNull MultiResolutionSubMesh>Returns the value of thesubMeshesrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aCachedMultiResolutionMeshrecord class.- Parameters:
positions- the value for thepositionsrecord componentnormals- the value for thenormalsrecord componentsubMeshes- the value for thesubMeshesrecord componentmaterials- the value for thematerialsrecord componentalphaTest- the value for thealphaTestrecord componentbbox- the value for thebboxrecord componentorientedBbox- the value for theorientedBboxrecord component
-
-
Method Details
-
subMeshCount
public long subMeshCount()- Specified by:
subMeshCountin interfaceMultiResolutionMesh
-
subMesh
- Specified by:
subMeshin interfaceMultiResolutionMesh
-
materialCount
public long materialCount()- Specified by:
materialCountin interfaceMultiResolutionMesh
-
material
- Specified by:
materialin interfaceMultiResolutionMesh
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedMultiResolutionMesh>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedMultiResolutionMesh>
-
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 '=='. -
positions
Returns the value of thepositionsrecord component.- Specified by:
positionsin interfaceMultiResolutionMesh- Returns:
- the value of the
positionsrecord component
-
normals
Returns the value of thenormalsrecord component.- Specified by:
normalsin interfaceMultiResolutionMesh- Returns:
- the value of the
normalsrecord component
-
subMeshes
Returns the value of thesubMeshesrecord component.- Specified by:
subMeshesin interfaceMultiResolutionMesh- Returns:
- the value of the
subMeshesrecord component
-
materials
Returns the value of thematerialsrecord component.- Specified by:
materialsin interfaceMultiResolutionMesh- Returns:
- the value of the
materialsrecord component
-
alphaTest
public boolean alphaTest()Returns the value of thealphaTestrecord component.- Specified by:
alphaTestin interfaceMultiResolutionMesh- Returns:
- the value of the
alphaTestrecord component
-
bbox
Returns the value of thebboxrecord component.- Specified by:
bboxin interfaceMultiResolutionMesh- Returns:
- the value of the
bboxrecord component
-
orientedBbox
Returns the value of theorientedBboxrecord component.- Specified by:
orientedBboxin interfaceMultiResolutionMesh- Returns:
- the value of the
orientedBboxrecord component
-