Class Box3D_F64

java.lang.Object
georegression.struct.shapes.Box3D_F64
All Implemented Interfaces:
Serializable

public class Box3D_F64 extends Object implements Serializable
An axis aligned box in 3D that is specified by two points, p0 and p1, the lower and upper extents of the box. Point p0 is less or equal to point p1, 0.x ≤ p1.x, p0.y ≤ p1.y, p0.z ≤ p1.z.
See Also:
  • Field Details

  • Constructor Details

    • Box3D_F64

      public Box3D_F64(double x0, double y0, double z0, double x1, double y1, double z1)
    • Box3D_F64

      public Box3D_F64(Box3D_F64 orig)
    • Box3D_F64

      public Box3D_F64()
  • Method Details

    • setTo

      public Box3D_F64 setTo(Box3D_F64 orig)
    • setTo

      public Box3D_F64 setTo(double x0, double y0, double z0, double x1, double y1, double z1)
    • zero

      public void zero()
    • isEquals

      public boolean isEquals(Box3D_F64 r, double tol)
      Returns true if all the extents are within tolerance.
      Parameters:
      r - Box
      tol - tolerance for equality. To be equal the difference must be less than or equal to this
      Returns:
      true if equal or false if not
    • isEquals

      public boolean isEquals(double x0, double y0, double z0, double x1, double y1, double z1, double tol)
      Returns true if all the extents are within tolerance.
      Parameters:
      x0 - lower extent. x-axis
      y0 - lower extent. y-axis
      x1 - upper extent. x-axis
      y1 - upper extent. y-axis
      tol - tolerance for equality. To be equal the difference must be less than or equal to this
      Returns:
      true if equal or false if not
    • area

      public double area()
      The box's area. area = lengthX*lengthY*lengthZ
      Returns:
      area
    • getLengthX

      public double getLengthX()
      Length of the box along the x-axis
      Returns:
      length
    • getLengthY

      public double getLengthY()
      Length of the box along the y-axis
      Returns:
      length
    • getLengthZ

      public double getLengthZ()
      Length of the box along the z-axis
      Returns:
      length
    • setP1

      public void setP1(Point3D_F64 p1)
    • setP0

      public void setP0(Point3D_F64 p0)
    • center

      public Point3D_F64 center(@Nullable @Nullable Point3D_F64 storage)
      Computes and return the center of the cube.
      Parameters:
      storage - Optional storage for the center. If null a new instance will be created and returned.
      Returns:
      The cube's center point
    • toString

      public String toString()
      Overrides:
      toString in class Object