Package dev.gothickit.zenkit
Record Class CachedOrientedBoundingBox
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.CachedOrientedBoundingBox
- All Implemented Interfaces:
CacheableObject<CachedOrientedBoundingBox>,OrientedBoundingBox
public record CachedOrientedBoundingBox(@NotNull Vec3f center, @NotNull Vec3f @NotNull [] axes, @NotNull Vec3f halfWidth, @NotNull List<OrientedBoundingBox> children)
extends Record
implements OrientedBoundingBox
-
Constructor Summary
ConstructorsConstructorDescriptionCachedOrientedBoundingBox(@NotNull Vec3f center, @NotNull Vec3f @NotNull [] axes, @NotNull Vec3f halfWidth, @NotNull List<OrientedBoundingBox> children) Creates an instance of aCachedOrientedBoundingBoxrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Vec3f @NotNull []axes()Returns the value of theaxesrecord component.@NotNull CachedOrientedBoundingBoxcache()@NotNull Vec3fcenter()Returns the value of thecenterrecord component.@Nullable OrientedBoundingBoxchild(long i) long@NotNull List<OrientedBoundingBox>children()Returns the value of thechildrenrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull Vec3fReturns the value of thehalfWidthrecord component.final inthashCode()Returns a hash code value for this object.booleanisCached()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedOrientedBoundingBox
public CachedOrientedBoundingBox(@NotNull @NotNull Vec3f center, @NotNull @NotNull Vec3f @NotNull [] axes, @NotNull @NotNull Vec3f halfWidth, @NotNull @NotNull List<OrientedBoundingBox> children) Creates an instance of aCachedOrientedBoundingBoxrecord class.- Parameters:
center- the value for thecenterrecord componentaxes- the value for theaxesrecord componenthalfWidth- the value for thehalfWidthrecord componentchildren- the value for thechildrenrecord component
-
-
Method Details
-
childCount
public long childCount()- Specified by:
childCountin interfaceOrientedBoundingBox
-
child
- Specified by:
childin interfaceOrientedBoundingBox
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedOrientedBoundingBox>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedOrientedBoundingBox>
-
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). -
center
Returns the value of thecenterrecord component.- Specified by:
centerin interfaceOrientedBoundingBox- Returns:
- the value of the
centerrecord component
-
axes
Returns the value of theaxesrecord component.- Specified by:
axesin interfaceOrientedBoundingBox- Returns:
- the value of the
axesrecord component
-
halfWidth
Returns the value of thehalfWidthrecord component.- Specified by:
halfWidthin interfaceOrientedBoundingBox- Returns:
- the value of the
halfWidthrecord component
-
children
Returns the value of thechildrenrecord component.- Specified by:
childrenin interfaceOrientedBoundingBox- Returns:
- the value of the
childrenrecord component
-