Record Class Box

java.lang.Object
java.lang.Record
cz.fidentis.analyst.data.shapes.Box
Record Components:
minPoint - minimum corner point
maxPoint - maximum corner point
All Implemented Interfaces:
Serializable

public record Box(javax.vecmath.Point3d minPoint, javax.vecmath.Point3d maxPoint) extends Record implements Serializable
A 3D box (e.g., a bounding box) of MeshPoints.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Box(Box bbox)
    Copy constructor.
    Box(javax.vecmath.Point3d minPoint, javax.vecmath.Point3d maxPoint)
    Creates an instance of a Box record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Return volume diagonal of the bounding box.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    javax.vecmath.Point3d
    Returns the value of the maxPoint record component.
    javax.vecmath.Point3d
    Return centroid of the bounding cube.
    javax.vecmath.Point3d
    Returns the value of the minPoint record component.
    Returns description of BoundignBox.

    Methods inherited from class java.lang.Object

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

    • Box

      public Box(Box bbox)
      Copy constructor.
      Parameters:
      bbox - Original bounding box. Must not be null
    • Box

      public Box(javax.vecmath.Point3d minPoint, javax.vecmath.Point3d maxPoint)
      Creates an instance of a Box record class.
      Parameters:
      minPoint - the value for the minPoint record component
      maxPoint - the value for the maxPoint record component
  • Method Details

    • midPoint

      public javax.vecmath.Point3d midPoint()
      Return centroid of the bounding cube.
      Returns:
      middle point of the bounding box
    • diagonalLength

      public double diagonalLength()
      Return volume diagonal of the bounding box.
      Returns:
      maximal diagonal of bounding box
    • toString

      public String toString()
      Returns description of BoundignBox.
      Specified by:
      toString in class Record
      Returns:
      String representation of the bounding box
    • 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 Objects::equals(Object,Object).
      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.
    • minPoint

      public javax.vecmath.Point3d minPoint()
      Returns the value of the minPoint record component.
      Returns:
      the value of the minPoint record component
    • maxPoint

      public javax.vecmath.Point3d maxPoint()
      Returns the value of the maxPoint record component.
      Returns:
      the value of the maxPoint record component