Package dev.gothickit.zenkit.msh
Record Class CachedPolygon
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.msh.CachedPolygon
- All Implemented Interfaces:
CacheableObject<CachedPolygon>,Polygon
public record CachedPolygon(int materialIndex, int lightMapIndex, int @NotNull [] positionIndices, int @NotNull [] polygonIndices, boolean portal, boolean occluder, boolean sector, boolean shouldRelight, boolean outdoor, boolean ghostOccluder, boolean dynamicallyLit, boolean lod, byte normalAxis, short sectorIndex)
extends Record
implements Polygon
-
Constructor Summary
ConstructorsConstructorDescriptionCachedPolygon(int materialIndex, int lightMapIndex, int @NotNull [] positionIndices, int @NotNull [] polygonIndices, boolean portal, boolean occluder, boolean sector, boolean shouldRelight, boolean outdoor, boolean ghostOccluder, boolean dynamicallyLit, boolean lod, byte normalAxis, short sectorIndex) Creates an instance of aCachedPolygonrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CachedPolygoncache()booleanReturns the value of thedynamicallyLitrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theghostOccluderrecord component.final inthashCode()Returns a hash code value for this object.booleanisCached()intReturns the value of thelightMapIndexrecord component.booleanlod()Returns the value of thelodrecord component.intReturns the value of thematerialIndexrecord component.byteReturns the value of thenormalAxisrecord component.booleanoccluder()Returns the value of theoccluderrecord component.booleanoutdoor()Returns the value of theoutdoorrecord component.int @NotNull []Returns the value of thepolygonIndicesrecord component.booleanportal()Returns the value of theportalrecord component.int @NotNull []Returns the value of thepositionIndicesrecord component.booleansector()Returns the value of thesectorrecord component.shortReturns the value of thesectorIndexrecord component.booleanReturns the value of theshouldRelightrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CachedPolygon
public CachedPolygon(int materialIndex, int lightMapIndex, int @NotNull [] positionIndices, int @NotNull [] polygonIndices, boolean portal, boolean occluder, boolean sector, boolean shouldRelight, boolean outdoor, boolean ghostOccluder, boolean dynamicallyLit, boolean lod, byte normalAxis, short sectorIndex) Creates an instance of aCachedPolygonrecord class.- Parameters:
materialIndex- the value for thematerialIndexrecord componentlightMapIndex- the value for thelightMapIndexrecord componentpositionIndices- the value for thepositionIndicesrecord componentpolygonIndices- the value for thepolygonIndicesrecord componentportal- the value for theportalrecord componentoccluder- the value for theoccluderrecord componentsector- the value for thesectorrecord componentshouldRelight- the value for theshouldRelightrecord componentoutdoor- the value for theoutdoorrecord componentghostOccluder- the value for theghostOccluderrecord componentdynamicallyLit- the value for thedynamicallyLitrecord componentlod- the value for thelodrecord componentnormalAxis- the value for thenormalAxisrecord componentsectorIndex- the value for thesectorIndexrecord component
-
-
Method Details
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedPolygon>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedPolygon>
-
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 '=='. -
materialIndex
public int materialIndex()Returns the value of thematerialIndexrecord component.- Specified by:
materialIndexin interfacePolygon- Returns:
- the value of the
materialIndexrecord component
-
lightMapIndex
public int lightMapIndex()Returns the value of thelightMapIndexrecord component.- Specified by:
lightMapIndexin interfacePolygon- Returns:
- the value of the
lightMapIndexrecord component
-
positionIndices
public int @NotNull [] positionIndices()Returns the value of thepositionIndicesrecord component.- Specified by:
positionIndicesin interfacePolygon- Returns:
- the value of the
positionIndicesrecord component
-
polygonIndices
public int @NotNull [] polygonIndices()Returns the value of thepolygonIndicesrecord component.- Specified by:
polygonIndicesin interfacePolygon- Returns:
- the value of the
polygonIndicesrecord component
-
portal
public boolean portal()Returns the value of theportalrecord component. -
occluder
public boolean occluder()Returns the value of theoccluderrecord component. -
sector
public boolean sector()Returns the value of thesectorrecord component. -
shouldRelight
public boolean shouldRelight()Returns the value of theshouldRelightrecord component.- Specified by:
shouldRelightin interfacePolygon- Returns:
- the value of the
shouldRelightrecord component
-
outdoor
public boolean outdoor()Returns the value of theoutdoorrecord component. -
ghostOccluder
public boolean ghostOccluder()Returns the value of theghostOccluderrecord component.- Specified by:
ghostOccluderin interfacePolygon- Returns:
- the value of the
ghostOccluderrecord component
-
dynamicallyLit
public boolean dynamicallyLit()Returns the value of thedynamicallyLitrecord component.- Specified by:
dynamicallyLitin interfacePolygon- Returns:
- the value of the
dynamicallyLitrecord component
-
lod
public boolean lod()Returns the value of thelodrecord component. -
normalAxis
public byte normalAxis()Returns the value of thenormalAxisrecord component.- Specified by:
normalAxisin interfacePolygon- Returns:
- the value of the
normalAxisrecord component
-
sectorIndex
public short sectorIndex()Returns the value of thesectorIndexrecord component.- Specified by:
sectorIndexin interfacePolygon- Returns:
- the value of the
sectorIndexrecord component
-