Record Class ModelBoundingBox

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.blueprint.ModelBoundingBox
Record Components:
minX - min-x
minY - min-y
minZ - min-z
maxX - max-x
maxY - max-y
maxZ - 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
    Modifier and Type
    Field
    Description
    static final ModelBoundingBox
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModelBoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
    Creates an instance of a ModelBoundingBox record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets centered bounding box
    @NotNull org.joml.Vector3d
    Gets center vector point
    double
    Gets center y
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
     
    double
    Gets length of bounding box
    double
    Gets zx length of bounding box
    @NotNull org.joml.Vector3d
    max()
     
    double
    Returns the value of the maxX record component.
    double
    Returns the value of the maxY record component.
    double
    Returns the value of the maxZ record component.
    @NotNull org.joml.Vector3d
    min()
     
    double
    Returns the value of the minX record component.
    double
    Returns the value of the minY record component.
    double
    Returns the value of the minZ record component.
    named(@NotNull BoneName name)
    Gets bounding box with name
    static @NotNull ModelBoundingBox
    of(double x, double y, double z)
     
    static @NotNull ModelBoundingBox
    of(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
     
    static @NotNull ModelBoundingBox
    of(@NotNull org.joml.Vector3d min, @NotNull org.joml.Vector3d max)
     
    rotate(@NotNull org.joml.Quaterniond quaterniond)
     
    times(double scale)
    Gets scaled bounding box
    final String
    Returns a string representation of this record class.
    double
    x()
    Gets x
    double
    y()
    Gets y
    double
    z()
    Gets z

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • ModelBoundingBox

      public ModelBoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
      Creates an instance of a ModelBoundingBox record class.
      Parameters:
      minX - the value for the minX record component
      minY - the value for the minY record component
      minZ - the value for the minZ record component
      maxX - the value for the maxX record component
      maxY - the value for the maxY record component
      maxZ - the value for the maxZ record component
  • Method Details

    • of

      @NotNull public static @NotNull ModelBoundingBox of(@NotNull @NotNull org.joml.Vector3d min, @NotNull @NotNull org.joml.Vector3d max)
    • of

      @NotNull public static @NotNull ModelBoundingBox of(double x, double y, double z)
    • of

      @NotNull public static @NotNull ModelBoundingBox of(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
    • named

      @NotNull public @NotNull NamedBoundingBox named(@NotNull @NotNull BoneName name)
      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

      @NotNull public @NotNull ModelBoundingBox times(double scale)
      Gets scaled bounding box
      Parameters:
      scale - scale
      Returns:
      scaled bounding box
    • center

      @NotNull public @NotNull ModelBoundingBox center()
      Gets centered bounding box
      Returns:
      centered bounding box
    • invert

      @NotNull public @NotNull ModelBoundingBox 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • minX

      public double minX()
      Returns the value of the minX record component.
      Returns:
      the value of the minX record component
    • minY

      public double minY()
      Returns the value of the minY record component.
      Returns:
      the value of the minY record component
    • minZ

      public double minZ()
      Returns the value of the minZ record component.
      Returns:
      the value of the minZ record component
    • maxX

      public double maxX()
      Returns the value of the maxX record component.
      Returns:
      the value of the maxX record component
    • maxY

      public double maxY()
      Returns the value of the maxY record component.
      Returns:
      the value of the maxY record component
    • maxZ

      public double maxZ()
      Returns the value of the maxZ record component.
      Returns:
      the value of the maxZ record component