Class Box3D

java.lang.Object
inra.ijpb.geometry.Box3D

public class Box3D
extends java.lang.Object
A bounding Box in 3 dimensions.
Author:
dlegland
See Also:
Box2D
  • Constructor Summary

    Constructors
    Constructor Description
    Box3D​(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
    Default constructor, that specifies the bounds along each dimension.
  • Method Summary

    Modifier and Type Method Description
    double depth()
    Computes the depth of the bounding box, corresponding to the extent along the Z dimension.
    double getXMax()  
    double getXMin()  
    double getYMax()  
    double getYMin()  
    double getZMax()  
    double getZMin()  
    double height()
    Computes the height of the bounding box, corresponding to the extent along the Y dimension.
    double volume()
    Computes the volume of this bounding box.
    double width()
    Computes the width of the bounding box, corresponding to the extent along the X dimension.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Box3D

      public Box3D​(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
      Default constructor, that specifies the bounds along each dimension.
      Parameters:
      xmin - the minimal bound along the x direction
      xmax - the maximal bound along the x direction
      ymin - the minimal bound along the y direction
      ymax - the maximal bound along the y direction
      zmin - the minimal bound along the z direction
      zmax - the maximal bound along the z direction
  • Method Details

    • volume

      public double volume()
      Computes the volume of this bounding box.
      Returns:
      the volume enclosed by the bounding box.
    • width

      public double width()
      Computes the width of the bounding box, corresponding to the extent along the X dimension.
      Returns:
      the width of the bounding box
    • height

      public double height()
      Computes the height of the bounding box, corresponding to the extent along the Y dimension.
      Returns:
      the height of the bounding box
    • depth

      public double depth()
      Computes the depth of the bounding box, corresponding to the extent along the Z dimension.
      Returns:
      the depth of the bounding box
    • getXMin

      public double getXMin()
      Returns:
      the minimum value along the X-axis.
    • getXMax

      public double getXMax()
      Returns:
      the maximum value along the X-axis.
    • getYMin

      public double getYMin()
      Returns:
      the minimum value along the Y-axis.
    • getYMax

      public double getYMax()
      Returns:
      the maximum value along the Y-axis.
    • getZMin

      public double getZMin()
      Returns:
      the minimum value along the Z-axis.
    • getZMax

      public double getZMax()
      Returns:
      the maximum value along the Z-axis.