Class Rectangle3D.Float

java.lang.Object
org.bzdev.geom.Rectangle3D
org.bzdev.geom.Rectangle3D.Float
All Implemented Interfaces:
Cloneable, Shape3D
Enclosing class:
Rectangle3D

public static class Rectangle3D.Float extends Rectangle3D
Subclass of Rectangle3D that stores its values as single-precision numbers.
  • Constructor Details

    • Float

      public Float()
      Constructor. The rectangle will have zero size and will be located at (0, 0, 0).
    • Float

      public Float(Object tag)
      Constructor with a tag. The rectangle will have zero size and will be located at (0, 0, 0).
      Parameters:
      tag - a tag naming this object; Rectangle3D.STACKTRACE to tag this object with a stacktrace
    • Float

      public Float(float x, float y, float z, float w, float h, float d)
      Constructor providing dimensions of a rectangular cuboid.
      Parameters:
      x - the X coordinate of the vertex whose coordinates have a minimal value.
      y - the Y coordinate of the vertex whose coordinates have a minimal value.
      z - the Z coordinate of the vertex whose coordinates have a minimal value.
      w - the width of the object (the length in the X direction)
      h - the height of the object (the length in the Y direction)
      d - the depth of the object (the length in the Z direction)
    • Float

      public Float(float x, float y, float z, float w, float h, float d, Object tag)
      Constructor providing dimensions of a rectangular cuboid and providing a tag.
      Parameters:
      x - the X coordinate of the vertex whose coordinates have a minimal value.
      y - the Y coordinate of the vertex whose coordinates have a minimal value.
      z - the Z coordinate of the vertex whose coordinates have a minimal value.
      w - the width of the object (the length in the X direction)
      h - the height of the object (the length in the Y direction)
      d - the depth of the object (the length in the Z direction)
      tag - a tag naming this object; Rectangle3D.STACKTRACE to tag this object with a stacktrace
  • Method Details

    • getMinX

      public double getMinX()
      Description copied from class: Rectangle3D
      Get the minimum X coordinate for this rectangular cuboid
      Specified by:
      getMinX in class Rectangle3D
      Returns:
      the minimum X coordinate
    • getMinY

      public double getMinY()
      Description copied from class: Rectangle3D
      Get the minimum Y coordinate for this rectangular cuboid
      Specified by:
      getMinY in class Rectangle3D
      Returns:
      the minimum Y coordinate
    • getMinZ

      public double getMinZ()
      Description copied from class: Rectangle3D
      Get the minimum Z coordinate for this rectangular cuboid
      Specified by:
      getMinZ in class Rectangle3D
      Returns:
      the minimum Z coordinate
    • getWidth

      public double getWidth()
      Description copied from class: Rectangle3D
      Get the width of this rectangular cuboid. The width is defined as the length in the X direction.
      Specified by:
      getWidth in class Rectangle3D
      Returns:
      the width
    • getHeight

      public double getHeight()
      Description copied from class: Rectangle3D
      Get the height of this rectangular cuboid. The height is defined as the length in the Y direction.
      Specified by:
      getHeight in class Rectangle3D
      Returns:
      the height
    • getDepth

      public double getDepth()
      Description copied from class: Rectangle3D
      Get the depth of this rectangular cuboid. The depth is defined as the length in the Z direction.
      Specified by:
      getDepth in class Rectangle3D
      Returns:
      the depth
    • setRect

      public void setRect(double x, double y, double z, double w, double h, double d)
      Description copied from class: Rectangle3D
      Set the configuration of this object given explicit coordinates and dimensions
      Specified by:
      setRect in class Rectangle3D
      Parameters:
      x - the X coordinate of the vertex whose coordinates have a minimal value.
      y - the Y coordinate of the vertex whose coordinates have a minimal value.
      z - the Z coordinate of the vertex whose coordinates have a minimal value.
      w - the width of the object (the length in the X direction)
      h - the height of the object (the length in the Y direction)
      d - the depth of the object (the length in the Z direction)
    • isEmpty

      public boolean isEmpty()
      Description copied from class: Rectangle3D
      Tests if a Rectangle3D object is empty. A Rectangle3D is empty if its width, height, and depth are all zero.
      Overrides:
      isEmpty in class Rectangle3D
      Returns:
      true if this object is empty; false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object