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 TypeMethodDescriptionbooleanbox(BoundingBox maybeContainedInside) Is this other bounding-box fully contained within this bounding box?booleanpoint(ReadableTuple3i point) Is this point within the bounding-box?booleanpointIgnoreZ(Point3i point) Likepoint(ReadableTuple3i)but ignores the z-dimension.booleanx(int value) Is this value in the X-dimension within the bounding box range?booleany(int value) Is this value in the Y-dimension within the bounding box range?booleanz(int value) Is this value in the Z-dimension within the bounding box range?
-
Constructor Details
-
BoundingBoxContains
Create with theBoundingBoxthat 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
maybeContainedInsideentirely lies inside the bounding-box.
-