public interface AABB2d
Modifier and Type | Method and Description |
---|---|
boolean |
contains(AABB2d box)
Returns true if the given bounding box is inside this bounding box.
|
boolean |
contains(Vector2d point)
Returns true if the given point is inside this bounding box.
|
static AABB2d |
create(AABB2d boundingBox)
Returns a bounding box with the same bounds as in the given bounding box.
|
static AABB2d |
create(Collection<Vector2d> points)
Returns the minimum area axis-aligned bounding box for the given
collection of points.
|
static AABB2d |
create(Vector2d lowerBound,
Vector2d upperBound)
Returns a bounding box with the given bounds.
|
double |
getArea()
Returns the area of this bounding box.
|
MVector2d |
getCentroid()
Returns a copy of the centroid vector of this bounding box.
|
List<Segment2d> |
getEdges()
Returns the edges of this axis-aligned bounding box in counter clockwise
order.
|
Vector2d |
getLowerBound()
Returns the lower bound of this bounding box.
|
double |
getSizeX()
Returns the size of this bounding box on the X axis.
|
double |
getSizeY()
Returns the size of this bounding box on the Y axis.
|
Vector2d |
getUpperBound()
Returns the upper bound of this bounding box.
|
List<Vector2d> |
getVertices()
Returns the vertices of this bounding box in counter clockwise order.
|
boolean |
intersects(AABB2d aabb)
Returns true if this bounding box intersects the given bounding box.
|
boolean |
isDegenerate()
Returns true if the given bounding box is degenerate.
|
static AABB2d create(AABB2d boundingBox)
boundingBox
- the bounding box whose bounds are set to the returned boxstatic AABB2d create(Collection<Vector2d> points)
points
- the points for which the minimum area axis-aligned bounding
box is computedstatic AABB2d create(Vector2d lowerBound, Vector2d upperBound)
lowerBound
- the lower bound for the bounding boxupperBound
- the upper bound for the bounding boxboolean contains(Vector2d point)
point
- the point that is checked for containmentboolean contains(AABB2d box)
box
- the bounding box that is checked for containmentMVector2d getCentroid()
List<Segment2d> getEdges()
Vector2d getLowerBound()
double getSizeX()
double getSizeY()
Vector2d getUpperBound()
List<Vector2d> getVertices()
double getArea()
boolean intersects(AABB2d aabb)
aabb
- the bounding box with which this box is checked for
intersectionboolean isDegenerate()
Copyright © 2019 Solibri, Inc.. All rights reserved.