Interface Box


  • public interface Box
    Box (Hyperrectangle) is generalization of a rectangle in 3-dimensional space. (Think of a normal real-life box.)
    Since:
    9.10.8
    • Method Detail

      • getBottomRectangle

        Rectangle3d getBottomRectangle()
        Returns the bottom rectangle of this box. The bottom rectangle also defines the directioning of the box. The side up is defined by the direction of the cross product from the vectors of the first three points in the rectangle. This is analoguous to Triangle3d. For example, if the bottom rectangle is formed by points (0,0,0), (1,0,0), (1,1,0) and (0,1,0), the up direction is to direction of the positive Z-unit vector.
        Returns:
        the bottom rectangle
        Since:
        9.10.8
      • getHeight

        double getHeight()
        Returns the height of this box. Note that the bottom rectangle defines the direction of "up", so this is just a scalar.
        Returns:
        the height of this box
        Since:
        9.10.8
      • getUpDirection

        Vector3d getUpDirection()
        A convenience method for getting the up direction of this box.
        Returns:
        the up direction
        Since:
        9.10.8
      • create

        static Box create​(Rectangle3d bottomRectangle,
                          double height)
        Creates a new instance of a box from given parameters.
        Parameters:
        bottomRectangle - the bottom rectangle of the box
        height - the height of the box
        Returns:
        the new box instance
        Since:
        9.10.8