Package org.anchoranalysis.spatial.box
Class BoundingBoxFactory
Object
BoundingBoxFactory
Utility methods to create a
BoundingBox
.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic BoundingBox
at
(int x, int y, int width, int height) Short-hand factory method for creating a 2D bounding-box.static BoundingBox
at
(int x, int y, int z, int width, int height, int depth) Short-hand factory method for creating a 3D bounding-box.static BoundingBox
uniform3D
(int corner, int extent) Short-hand factory method for creating a 3D bounding-box, where a coordinate is identical in each dimension.
-
Method Details
-
at
Short-hand factory method for creating a 2D bounding-box.- Parameters:
x
- left-corner in x-dimensiony
- left-corner in y-dimensionwidth
- bounding-box width (extent in x-dimension)height
- bounding-box width (extent in y-dimension)- Returns:
- the newly created bounding-box
-
at
Short-hand factory method for creating a 3D bounding-box.- Parameters:
x
- left-corner in x-dimensiony
- left-corner in y-dimensionz
- left-corner in z-dimensionwidth
- bounding-box width (extent in x-dimension)height
- bounding-box width (extent in y-dimension)depth
- bounding-box width (extent in z-dimension)- Returns:
- the newly created bounding-box
-
uniform3D
Short-hand factory method for creating a 3D bounding-box, where a coordinate is identical in each dimension.- Parameters:
corner
- left-corner in every dimensionextent
- extent in every dimension- Returns:
- the newly created bounding-box
-