Record Class PreviewMesh.Box
java.lang.Object
java.lang.Record
dev.despical.mazeengine.core.PreviewMesh.Box
- Enclosing class:
PreviewMesh
public static record PreviewMesh.Box(int x, double y, int z, int width, double height, int depth, PreviewMesh.Kind kind)
extends Record
Stores one local rectangular region in the preview mesh.
The minimum corner and extents describe merged structure relative to the maze origin. Fractional Y and height support thin portal and roof markers; the display layer adds world coordinates and material sampling separately.
-
Constructor Summary
ConstructorsConstructorDescriptionBox(int x, double y, int z, int width, double height, int depth, PreviewMesh.Kind kind) Creates an instance of aBoxrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdepth()Returns the value of thedepthrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheight()Returns the value of theheightrecord component.kind()Returns the value of thekindrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.intx()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.intz()Returns the value of thezrecord component.
-
Constructor Details
-
Box
Creates an instance of aBoxrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentdepth- the value for thedepthrecord componentkind- the value for thekindrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public int z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public double height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
depth
public int depth()Returns the value of thedepthrecord component.- Returns:
- the value of the
depthrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-