Package dev.gothickit.zenkit.msh
Record Class CachedMesh
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.msh.CachedMesh
- All Implemented Interfaces:
CacheableObject<CachedMesh>,Mesh
public record CachedMesh(@NotNull Calendar sourceDate, @NotNull String name, @NotNull AxisAlignedBoundingBox boundingBox, @NotNull OrientedBoundingBox orientedBoundingBox, @NotNull List<@NotNull Material> materials, @NotNull Vec3f @NotNull [] positions, @NotNull Vertex @NotNull [] vertices, @NotNull List<@NotNull LightMap> lightMaps, @NotNull List<@NotNull Polygon> polygons)
extends Record
implements Mesh
-
Constructor Summary
ConstructorsConstructorDescriptionCachedMesh(@NotNull Calendar sourceDate, @NotNull String name, @NotNull AxisAlignedBoundingBox boundingBox, @NotNull OrientedBoundingBox orientedBoundingBox, @NotNull List<@NotNull Material> materials, @NotNull Vec3f @NotNull [] positions, @NotNull Vertex @NotNull [] vertices, @NotNull List<@NotNull LightMap> lightMaps, @NotNull List<@NotNull Polygon> polygons) Creates an instance of aCachedMeshrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull AxisAlignedBoundingBoxReturns the value of theboundingBoxrecord component.@NotNull CachedMeshcache()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisCached()@Nullable LightMaplightMap(long i) longReturns the value of thelightMapsrecord component.@Nullable Materialmaterial(long i) longReturns the value of thematerialsrecord component.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull OrientedBoundingBoxReturns the value of theorientedBoundingBoxrecord component.@Nullable Polygonpolygon(long i) longpolygons()Returns the value of thepolygonsrecord component.@NotNull Vec3f @NotNull []Returns the value of thepositionsrecord component.@NotNull CalendarReturns the value of thesourceDaterecord component.final StringtoString()Returns a string representation of this record class.@NotNull Vertex @NotNull []vertices()Returns the value of theverticesrecord component.
-
Constructor Details
-
CachedMesh
public CachedMesh(@NotNull @NotNull Calendar sourceDate, @NotNull @NotNull String name, @NotNull @NotNull AxisAlignedBoundingBox boundingBox, @NotNull @NotNull OrientedBoundingBox orientedBoundingBox, @NotNull @NotNull List<@NotNull Material> materials, @NotNull @NotNull Vec3f @NotNull [] positions, @NotNull @NotNull Vertex @NotNull [] vertices, @NotNull @NotNull List<@NotNull LightMap> lightMaps, @NotNull @NotNull List<@NotNull Polygon> polygons) Creates an instance of aCachedMeshrecord class.- Parameters:
sourceDate- the value for thesourceDaterecord componentname- the value for thenamerecord componentboundingBox- the value for theboundingBoxrecord componentorientedBoundingBox- the value for theorientedBoundingBoxrecord componentmaterials- the value for thematerialsrecord componentpositions- the value for thepositionsrecord componentvertices- the value for theverticesrecord componentlightMaps- the value for thelightMapsrecord componentpolygons- the value for thepolygonsrecord component
-
-
Method Details
-
materialCount
public long materialCount()- Specified by:
materialCountin interfaceMesh
-
material
-
lightMapCount
public long lightMapCount()- Specified by:
lightMapCountin interfaceMesh
-
lightMap
-
polygonCount
public long polygonCount()- Specified by:
polygonCountin interfaceMesh
-
polygon
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedMesh>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedMesh>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
sourceDate
Returns the value of thesourceDaterecord component.- Specified by:
sourceDatein interfaceMesh- Returns:
- the value of the
sourceDaterecord component
-
name
Returns the value of thenamerecord component. -
boundingBox
Returns the value of theboundingBoxrecord component.- Specified by:
boundingBoxin interfaceMesh- Returns:
- the value of the
boundingBoxrecord component
-
orientedBoundingBox
Returns the value of theorientedBoundingBoxrecord component.- Specified by:
orientedBoundingBoxin interfaceMesh- Returns:
- the value of the
orientedBoundingBoxrecord component
-
materials
Returns the value of thematerialsrecord component. -
positions
Returns the value of thepositionsrecord component. -
vertices
Returns the value of theverticesrecord component. -
lightMaps
Returns the value of thelightMapsrecord component. -
polygons
Returns the value of thepolygonsrecord component.
-