java.lang.Object
org.bzdev.geom.Rectangle3D
org.bzdev.geom.Rectangle3D.Float
- Enclosing class:
- Rectangle3D
Subclass of
Rectangle3D that stores its values as
single-precision numbers.-
Nested Class Summary
Nested classes/interfaces inherited from class org.bzdev.geom.Rectangle3D
Rectangle3D.Double, Rectangle3D.Float -
Field Summary
Fields inherited from class org.bzdev.geom.Rectangle3D
STACKTRACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDepth()Get the depth of this rectangular cuboid.doubleGet the height of this rectangular cuboid.doublegetMinX()Get the minimum X coordinate for this rectangular cuboiddoublegetMinY()Get the minimum Y coordinate for this rectangular cuboiddoublegetMinZ()Get the minimum Z coordinate for this rectangular cuboiddoublegetWidth()Get the width of this rectangular cuboid.booleanisEmpty()Tests if a Rectangle3D object is empty.voidsetRect(double x, double y, double z, double w, double h, double d) Set the configuration of this object given explicit coordinates and dimensionstoString()Methods inherited from class org.bzdev.geom.Rectangle3D
add, add, add, clone, contains, contains, contains, contains, createIntersection, createUnion, equals, getBoundary, getBounds, getCenterX, getCenterY, getCenterZ, getComponent, getMaxX, getMaxY, getMaxZ, getSurfaceIterator, hashCode, intersect, intersects, intersects, isClosedManifold, isOriented, numberOfComponents, setColor, setRect, setRectFromCenter, setRectFromCenter, setRectFromDiagonal, setRectFromDiagonal, unionMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bzdev.geom.Shape3D
getBoundary, getSurfaceIterator
-
Constructor Details
-
Float
public Float()Constructor. The rectangle will have zero size and will be located at (0, 0, 0). -
Float
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.STACKTRACEto 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
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.STACKTRACEto tag this object with a stacktrace
-
-
Method Details
-
getMinX
public double getMinX()Description copied from class:Rectangle3DGet the minimum X coordinate for this rectangular cuboid- Specified by:
getMinXin classRectangle3D- Returns:
- the minimum X coordinate
-
getMinY
public double getMinY()Description copied from class:Rectangle3DGet the minimum Y coordinate for this rectangular cuboid- Specified by:
getMinYin classRectangle3D- Returns:
- the minimum Y coordinate
-
getMinZ
public double getMinZ()Description copied from class:Rectangle3DGet the minimum Z coordinate for this rectangular cuboid- Specified by:
getMinZin classRectangle3D- Returns:
- the minimum Z coordinate
-
getWidth
public double getWidth()Description copied from class:Rectangle3DGet the width of this rectangular cuboid. The width is defined as the length in the X direction.- Specified by:
getWidthin classRectangle3D- Returns:
- the width
-
getHeight
public double getHeight()Description copied from class:Rectangle3DGet the height of this rectangular cuboid. The height is defined as the length in the Y direction.- Specified by:
getHeightin classRectangle3D- Returns:
- the height
-
getDepth
public double getDepth()Description copied from class:Rectangle3DGet the depth of this rectangular cuboid. The depth is defined as the length in the Z direction.- Specified by:
getDepthin classRectangle3D- Returns:
- the depth
-
setRect
public void setRect(double x, double y, double z, double w, double h, double d) Description copied from class:Rectangle3DSet the configuration of this object given explicit coordinates and dimensions- Specified by:
setRectin classRectangle3D- 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:Rectangle3DTests if a Rectangle3D object is empty. A Rectangle3D is empty if its width, height, and depth are all zero.- Overrides:
isEmptyin classRectangle3D- Returns:
- true if this object is empty; false otherwise
-
toString
-