Package cz.fidentis.analyst.data.shapes
Record Class Box
java.lang.Object
java.lang.Record
cz.fidentis.analyst.data.shapes.Box
- Record Components:
minPoint
- minimum corner pointmaxPoint
- 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
MeshPoint
s.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Return volume diagonal of the bounding box.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.javax.vecmath.Point3d
maxPoint()
Returns the value of themaxPoint
record component.javax.vecmath.Point3d
midPoint()
Return centroid of the bounding cube.javax.vecmath.Point3d
minPoint()
Returns the value of theminPoint
record component.toString()
Returns description of BoundignBox.
-
Constructor Details
-
Box
Copy constructor.- Parameters:
bbox
- Original bounding box. Must not benull
-
Box
public Box(javax.vecmath.Point3d minPoint, javax.vecmath.Point3d maxPoint) Creates an instance of aBox
record class.
-
-
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
Returns description of BoundignBox. -
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 withObjects::equals(Object,Object)
. -
minPoint
public javax.vecmath.Point3d minPoint()Returns the value of theminPoint
record component.- Returns:
- the value of the
minPoint
record component
-
maxPoint
public javax.vecmath.Point3d maxPoint()Returns the value of themaxPoint
record component.- Returns:
- the value of the
maxPoint
record component
-