Package org.anchoranalysis.spatial.box
Class BoundingBoxContains
Object
BoundingBoxContains
Does a bounding box contain other objects?
The other objects can be points, other bounding boxes etc.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
box
(BoundingBox maybeContainedInside) Is this other bounding-box fully contained within this bounding box?boolean
point
(ReadableTuple3i point) Is this point within the bounding-box?boolean
pointIgnoreZ
(Point3i point) Likepoint(ReadableTuple3i)
but ignores the z-dimension.boolean
x
(int value) Is this value in the X-dimension within the bounding box range?boolean
y
(int value) Is this value in the Y-dimension within the bounding box range?boolean
z
(int value) Is this value in the Z-dimension within the bounding box range?
-
Constructor Details
-
BoundingBoxContains
Create with theBoundingBox
that is queried.- Parameters:
box
- the bounding-box to query whether other entities are contained within it.
-
-
Method Details
-
x
public boolean x(int value) Is this value in the X-dimension within the bounding box range?- Parameters:
value
- a value to be tested whether it lies within the bounding-box on the X-axis.- Returns:
- true iff the value is within the range.
-
y
public boolean y(int value) Is this value in the Y-dimension within the bounding box range?- Parameters:
value
- a value to be tested whether it lies within the bounding-box on the Y-axis.- Returns:
- true iff the value is within the range.
-
z
public boolean z(int value) Is this value in the Z-dimension within the bounding box range?- Parameters:
value
- a value to be tested whether it lies within the bounding-box on the Z-axis.- Returns:
- true iff the value is within the range.
-
point
Is this point within the bounding-box?- Parameters:
point
- point to test whether it lies within the bounding-box.- Returns:
- true iff the point lies inside the bounding-box.
-
pointIgnoreZ
Likepoint(ReadableTuple3i)
but ignores the z-dimension.- Parameters:
point
- point to test whether it lies within the bounding-box.- Returns:
- true iff the point lies inside the bounding-box, disregarding the z-dimension.
-
box
Is this other bounding-box fully contained within this bounding box?- Parameters:
maybeContainedInside
- box to test whether it is contained inside or not.- Returns:
- true iff the
maybeContainedInside
entirely lies inside the bounding-box.
-