Package dev.gothickit.zenkit.mdh
Record Class CachedModelHierarchy
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.mdh.CachedModelHierarchy
- All Implemented Interfaces:
CacheableObject<CachedModelHierarchy>,ModelHierarchy
public record CachedModelHierarchy(@NotNull AxisAlignedBoundingBox bbox, @NotNull AxisAlignedBoundingBox collisionBbox, @NotNull Vec3f rootTranslation, long checksum, @NotNull Calendar sourceDate, @NotNull String sourcePath, @NotNull List<@NotNull ModelHierarchyNode> nodes)
extends Record
implements ModelHierarchy
-
Constructor Summary
ConstructorsConstructorDescriptionCachedModelHierarchy(@NotNull AxisAlignedBoundingBox bbox, @NotNull AxisAlignedBoundingBox collisionBbox, @NotNull Vec3f rootTranslation, long checksum, @NotNull Calendar sourceDate, @NotNull String sourcePath, @NotNull List<@NotNull ModelHierarchyNode> nodes) Creates an instance of aCachedModelHierarchyrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull AxisAlignedBoundingBoxbbox()Returns the value of thebboxrecord component.@NotNull CachedModelHierarchycache()longchecksum()Returns the value of thechecksumrecord component.@NotNull AxisAlignedBoundingBoxReturns the value of thecollisionBboxrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisCached()@Nullable ModelHierarchyNodenode(long i) long@NotNull List<@NotNull ModelHierarchyNode>nodes()Returns the value of thenodesrecord component.@NotNull Vec3fReturns the value of therootTranslationrecord component.@NotNull CalendarReturns the value of thesourceDaterecord component.@NotNull StringReturns the value of thesourcePathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedModelHierarchy
public CachedModelHierarchy(@NotNull @NotNull AxisAlignedBoundingBox bbox, @NotNull @NotNull AxisAlignedBoundingBox collisionBbox, @NotNull @NotNull Vec3f rootTranslation, long checksum, @NotNull @NotNull Calendar sourceDate, @NotNull @NotNull String sourcePath, @NotNull @NotNull List<@NotNull ModelHierarchyNode> nodes) Creates an instance of aCachedModelHierarchyrecord class.- Parameters:
bbox- the value for thebboxrecord componentcollisionBbox- the value for thecollisionBboxrecord componentrootTranslation- the value for therootTranslationrecord componentchecksum- the value for thechecksumrecord componentsourceDate- the value for thesourceDaterecord componentsourcePath- the value for thesourcePathrecord componentnodes- the value for thenodesrecord component
-
-
Method Details
-
nodeCount
public long nodeCount()- Specified by:
nodeCountin interfaceModelHierarchy
-
node
- Specified by:
nodein interfaceModelHierarchy
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedModelHierarchy>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedModelHierarchy>
-
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 '=='. -
bbox
Returns the value of thebboxrecord component.- Specified by:
bboxin interfaceModelHierarchy- Returns:
- the value of the
bboxrecord component
-
collisionBbox
Returns the value of thecollisionBboxrecord component.- Specified by:
collisionBboxin interfaceModelHierarchy- Returns:
- the value of the
collisionBboxrecord component
-
rootTranslation
Returns the value of therootTranslationrecord component.- Specified by:
rootTranslationin interfaceModelHierarchy- Returns:
- the value of the
rootTranslationrecord component
-
checksum
public long checksum()Returns the value of thechecksumrecord component.- Specified by:
checksumin interfaceModelHierarchy- Returns:
- the value of the
checksumrecord component
-
sourceDate
Returns the value of thesourceDaterecord component.- Specified by:
sourceDatein interfaceModelHierarchy- Returns:
- the value of the
sourceDaterecord component
-
sourcePath
Returns the value of thesourcePathrecord component.- Specified by:
sourcePathin interfaceModelHierarchy- Returns:
- the value of the
sourcePathrecord component
-
nodes
Returns the value of thenodesrecord component.- Specified by:
nodesin interfaceModelHierarchy- Returns:
- the value of the
nodesrecord component
-