Package dev.gothickit.zenkit.bsp
Record Class CachedBinarySpacePartitionTree
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.bsp.CachedBinarySpacePartitionTree
- All Implemented Interfaces:
BinarySpacePartitionTree,CacheableObject<CachedBinarySpacePartitionTree>
public record CachedBinarySpacePartitionTree(@NotNull BinarySpacePartitionType type, int @NotNull [] polygonIndices, int @NotNull [] leafPolygonIndices, int @NotNull [] portalPolygonIndices, @NotNull Vec3f @NotNull [] lightPoints, long @NotNull [] leafNodeIndices, @NotNull BinarySpacePartitionNode @NotNull [] nodes, @NotNull List<@NotNull BinarySpacePartitionSector> sectors)
extends Record
implements BinarySpacePartitionTree
-
Constructor Summary
ConstructorsConstructorDescriptionCachedBinarySpacePartitionTree(@NotNull BinarySpacePartitionType type, int @NotNull [] polygonIndices, int @NotNull [] leafPolygonIndices, int @NotNull [] portalPolygonIndices, @NotNull Vec3f @NotNull [] lightPoints, long @NotNull [] leafNodeIndices, @NotNull BinarySpacePartitionNode @NotNull [] nodes, @NotNull List<@NotNull BinarySpacePartitionSector> sectors) Creates an instance of aCachedBinarySpacePartitionTreerecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CachedBinarySpacePartitionTreecache()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisCached()long @NotNull []Returns the value of theleafNodeIndicesrecord component.int @NotNull []Returns the value of theleafPolygonIndicesrecord component.@NotNull Vec3f @NotNull []Returns the value of thelightPointsrecord component.@NotNull BinarySpacePartitionNode @NotNull []nodes()Returns the value of thenodesrecord component.int @NotNull []Returns the value of thepolygonIndicesrecord component.int @NotNull []Returns the value of theportalPolygonIndicesrecord component.@Nullable BinarySpacePartitionSectorsector(long i) long@NotNull List<@NotNull BinarySpacePartitionSector>sectors()Returns the value of thesectorsrecord component.final StringtoString()Returns a string representation of this record class.@NotNull BinarySpacePartitionTypetype()Returns the value of thetyperecord component.
-
Constructor Details
-
CachedBinarySpacePartitionTree
public CachedBinarySpacePartitionTree(@NotNull @NotNull BinarySpacePartitionType type, int @NotNull [] polygonIndices, int @NotNull [] leafPolygonIndices, int @NotNull [] portalPolygonIndices, @NotNull @NotNull Vec3f @NotNull [] lightPoints, long @NotNull [] leafNodeIndices, @NotNull @NotNull BinarySpacePartitionNode @NotNull [] nodes, @NotNull @NotNull List<@NotNull BinarySpacePartitionSector> sectors) Creates an instance of aCachedBinarySpacePartitionTreerecord class.- Parameters:
type- the value for thetyperecord componentpolygonIndices- the value for thepolygonIndicesrecord componentleafPolygonIndices- the value for theleafPolygonIndicesrecord componentportalPolygonIndices- the value for theportalPolygonIndicesrecord componentlightPoints- the value for thelightPointsrecord componentleafNodeIndices- the value for theleafNodeIndicesrecord componentnodes- the value for thenodesrecord componentsectors- the value for thesectorsrecord component
-
-
Method Details
-
lightPoints
Returns the value of thelightPointsrecord component.- Specified by:
lightPointsin interfaceBinarySpacePartitionTree- Returns:
- the value of the
lightPointsrecord component
-
sectorCount
public long sectorCount()- Specified by:
sectorCountin interfaceBinarySpacePartitionTree
-
sector
- Specified by:
sectorin interfaceBinarySpacePartitionTree
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedBinarySpacePartitionTree>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedBinarySpacePartitionTree>
-
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). -
type
Returns the value of thetyperecord component.- Specified by:
typein interfaceBinarySpacePartitionTree- Returns:
- the value of the
typerecord component
-
polygonIndices
public int @NotNull [] polygonIndices()Returns the value of thepolygonIndicesrecord component.- Specified by:
polygonIndicesin interfaceBinarySpacePartitionTree- Returns:
- the value of the
polygonIndicesrecord component
-
leafPolygonIndices
public int @NotNull [] leafPolygonIndices()Returns the value of theleafPolygonIndicesrecord component.- Specified by:
leafPolygonIndicesin interfaceBinarySpacePartitionTree- Returns:
- the value of the
leafPolygonIndicesrecord component
-
portalPolygonIndices
public int @NotNull [] portalPolygonIndices()Returns the value of theportalPolygonIndicesrecord component.- Specified by:
portalPolygonIndicesin interfaceBinarySpacePartitionTree- Returns:
- the value of the
portalPolygonIndicesrecord component
-
leafNodeIndices
public long @NotNull [] leafNodeIndices()Returns the value of theleafNodeIndicesrecord component.- Specified by:
leafNodeIndicesin interfaceBinarySpacePartitionTree- Returns:
- the value of the
leafNodeIndicesrecord component
-
nodes
Returns the value of thenodesrecord component.- Specified by:
nodesin interfaceBinarySpacePartitionTree- Returns:
- the value of the
nodesrecord component
-
sectors
Returns the value of thesectorsrecord component.- Specified by:
sectorsin interfaceBinarySpacePartitionTree- Returns:
- the value of the
sectorsrecord component
-