Package com.solibri.geometry.primitive2d
Interface AABB2d
- All Known Subinterfaces:
- MAABB2d
public interface AABB2d
Read-only interface for axis-aligned bounding boxes in XY-plane.
- Since:
- 9.10.2
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns true if the given point is inside this bounding box.booleanReturns true if the given bounding box is inside this bounding box.static AABB2dReturns a bounding box with the given bounds.static AABB2dReturns a bounding box with the same bounds as in the given bounding box.static AABB2dcreate(Collection<Vector2d> points) Returns the minimum area axis-aligned bounding box for the given collection of points.doublegetArea()Returns the area of this bounding box.Returns a copy of the centroid vector of this bounding box.getEdges()Returns the edges of this axis-aligned bounding box in counter clockwise order.Returns the lower bound of this bounding box.doublegetSizeX()Returns the size of this bounding box on the X axis.doublegetSizeY()Returns the size of this bounding box on the Y axis.Returns the upper bound of this bounding box.Returns the vertices of this bounding box in counter clockwise order.booleanintersects(AABB2d aabb) Returns true if this bounding box intersects the given bounding box.booleanReturns true if the given bounding box is degenerate.
- 
Method Details- 
createReturns a bounding box with the same bounds as in the given bounding box.- Parameters:
- boundingBox- the bounding box whose bounds are set to the returned box
- Returns:
- a new bounding box with the same bounds as in the given bounding box
- Throws:
- IllegalArgumentException- if given bounding box is not valid, meaning that lowerBound is greater than upperBound in either dimension
- Since:
- 9.10.2
 
- 
createReturns the minimum area axis-aligned bounding box for the given collection of points.- Parameters:
- points- the points for which the minimum area axis-aligned bounding box is computed
- Returns:
- the minimum area axis-aligned bounding box for the given collection of points
- Since:
- 9.10.2
 
- 
createReturns a bounding box with the given bounds. If lowerBound is greater than upperBound in either dimension, IllegalArgumentException is thrown.- Parameters:
- lowerBound- the lower bound for the bounding box
- upperBound- the upper bound for the bounding box
- Returns:
- a bounding box with the given bounds
- Throws:
- IllegalArgumentException- if lowerBound is greater than upperBound in either dimension
- Since:
- 9.10.2
 
- 
containsReturns true if the given point is inside this bounding box. Points on the boundary of bounding boxes are also considered to be contained.- Parameters:
- point- the point that is checked for containment
- Returns:
- true if the given point is contained in this bounding box
- Since:
- 9.10.2
 
- 
containsReturns true if the given bounding box is inside this bounding box.- Parameters:
- box- the bounding box that is checked for containment
- Returns:
- true if the given bounding box is inside this bounding box
- Since:
- 9.10.2
 
- 
getCentroidMVector2d getCentroid()Returns a copy of the centroid vector of this bounding box.- Returns:
- a copy of the centroid of this bounding box
- Since:
- 9.10.2
 
- 
getEdgesReturns the edges of this axis-aligned bounding box in counter clockwise order. The first edge is not specified.- Returns:
- the edges of this axis-aligned bounding box in counter clockwise order
- Since:
- 9.10.2
 
- 
getLowerBoundVector2d getLowerBound()Returns the lower bound of this bounding box.- Returns:
- the lower bound of this bounding box
- Since:
- 9.10.2
 
- 
getSizeXdouble getSizeX()Returns the size of this bounding box on the X axis.- Returns:
- the size of this bounding box on the X axis
- Since:
- 9.10.2
 
- 
getSizeYdouble getSizeY()Returns the size of this bounding box on the Y axis.- Returns:
- the size of this bounding box on the Y axis
- Since:
- 9.10.2
 
- 
getUpperBoundVector2d getUpperBound()Returns the upper bound of this bounding box.- Returns:
- the upper bound of this bounding box
- Since:
- 9.10.2
 
- 
getVerticesReturns the vertices of this bounding box in counter clockwise order. If the box is degenerate, then returns an empty list. The first vertex is not specified.- Returns:
- the vertices of this bounding box in counter clockwise order
- Since:
- 9.10.2
 
- 
getAreadouble getArea()Returns the area of this bounding box.- Returns:
- the area of this bounding box
- Since:
- 9.10.2
 
- 
intersectsReturns true if this bounding box intersects the given bounding box.- Parameters:
- aabb- the bounding box with which this box is checked for intersection
- Returns:
- true if this bounding box intersects the given bounding box
- Since:
- 9.10.2
 
- 
isDegenerateboolean isDegenerate()Returns true if the given bounding box is degenerate. A bounding box is considered degenerate if its area is zero or if its lower bound is greater than its upper bound in either dimension.- Returns:
- true if the given bounding box is degenerate
- Since:
- 9.10.2
 
 
-