Record Class ModelBoundingBox
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.blueprint.ModelBoundingBox
- Record Components:
minX- min-xminY- min-yminZ- min-zmaxX- max-xmaxY- max-ymaxZ- max-z
public record ModelBoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
extends Record
Model bounding box
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModelBoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) Creates an instance of aModelBoundingBoxrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull ModelBoundingBoxcenter()Gets centered bounding box@NotNull org.joml.Vector3dGets center vector pointdoublecenterY()Gets center yfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull ModelBoundingBoxinvert()doublelength()Gets length of bounding boxdoublelengthZX()Gets zx length of bounding box@NotNull org.joml.Vector3dmax()doublemaxX()Returns the value of themaxXrecord component.doublemaxY()Returns the value of themaxYrecord component.doublemaxZ()Returns the value of themaxZrecord component.@NotNull org.joml.Vector3dmin()doubleminX()Returns the value of theminXrecord component.doubleminY()Returns the value of theminYrecord component.doubleminZ()Returns the value of theminZrecord component.@NotNull NamedBoundingBoxGets bounding box with namestatic @NotNull ModelBoundingBoxof(double x, double y, double z) static @NotNull ModelBoundingBoxof(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) static @NotNull ModelBoundingBoxof(@NotNull org.joml.Vector3d min, @NotNull org.joml.Vector3d max) @NotNull ModelBoundingBoxrotate(@NotNull org.joml.Quaterniond quaterniond) @NotNull ModelBoundingBoxtimes(double scale) Gets scaled bounding boxfinal StringtoString()Returns a string representation of this record class.doublex()Gets xdoubley()Gets ydoublez()Gets z
-
Field Details
-
MIN
-
-
Constructor Details
-
ModelBoundingBox
public ModelBoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) Creates an instance of aModelBoundingBoxrecord class.
-
-
Method Details
-
of
@NotNull public static @NotNull ModelBoundingBox of(@NotNull @NotNull org.joml.Vector3d min, @NotNull @NotNull org.joml.Vector3d max) -
of
-
of
@NotNull public static @NotNull ModelBoundingBox of(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) -
named
Gets bounding box with name- Parameters:
name- name- Returns:
- named box
-
x
public double x()Gets x- Returns:
- x
-
y
public double y()Gets y- Returns:
- y
-
centerY
public double centerY()Gets center y- Returns:
- center y
-
z
public double z()Gets z- Returns:
- z
-
centerPoint
@NotNull public @NotNull org.joml.Vector3d centerPoint()Gets center vector point- Returns:
- center
-
times
Gets scaled bounding box- Parameters:
scale- scale- Returns:
- scaled bounding box
-
center
Gets centered bounding box- Returns:
- centered bounding box
-
invert
-
rotate
@NotNull public @NotNull ModelBoundingBox rotate(@NotNull @NotNull org.joml.Quaterniond quaterniond) -
min
@NotNull public @NotNull org.joml.Vector3d min() -
max
@NotNull public @NotNull org.joml.Vector3d max() -
lengthZX
public double lengthZX()Gets zx length of bounding box- Returns:
- zx length
-
length
public double length()Gets length of bounding box- Returns:
- length
-
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 with '=='. -
minX
public double minX()Returns the value of theminXrecord component.- Returns:
- the value of the
minXrecord component
-
minY
public double minY()Returns the value of theminYrecord component.- Returns:
- the value of the
minYrecord component
-
minZ
public double minZ()Returns the value of theminZrecord component.- Returns:
- the value of the
minZrecord component
-
maxX
public double maxX()Returns the value of themaxXrecord component.- Returns:
- the value of the
maxXrecord component
-
maxY
public double maxY()Returns the value of themaxYrecord component.- Returns:
- the value of the
maxYrecord component
-
maxZ
public double maxZ()Returns the value of themaxZrecord component.- Returns:
- the value of the
maxZrecord component
-