public interface Area
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Vector2d point)
Checks if the area contains the given point.
|
static Area |
create()
Returns an empty area.
|
static Area |
create(Area area)
Creates an area with the given area.
|
static Area |
create(Collection<? extends Area> areas)
Creates an union area with the given areas.
|
static Area |
create(List<? extends Vector2d> polygonPoints)
Creates an area with the given polygon points.
|
static Area |
create(Polygon2d polygon,
double resize)
Creates an area with the given polygon and resize value.
|
static Area |
create(Shape shape)
Creates an area with the given
Shape . |
MAABB2d |
getBoundingRectangle()
Returns a copy of a bounding rectangle which has minimum area and is axis
aligned.
|
MVector2d |
getCentroid()
Returns the centroid of this area.
|
List<MPolygon2d> |
getHoles()
Returns a list of holes in the area.
|
MPolygon2d |
getLargestPolygon()
Returns the largest outer polygon of the area.
|
Rectangle2d |
getMinimumBoundingRectangle()
Returns the minimum area bounding rectangle.
|
List<MPolygon2d> |
getPolygons()
Returns a list of polygons in the area.
|
double |
getSize()
Returns the size of the area.
|
List<MVector2d> |
getVertices()
Returns a list of vertices in the area.
|
boolean |
isEmpty()
Tests whether this area object encloses any area.
|
boolean |
isSingular()
Tests whether this area is comprised of a single closed subpath.
|
static Area create()
static Area create(List<? extends Vector2d> polygonPoints)
polygonPoints
- the points used for creating the areastatic Area create(Area area)
area
- the area used for creating the returned areastatic Area create(Polygon2d polygon, double resize)
polygon
- the polygon used for creating the returned arearesize
- the amount of resize used for creating the returned areastatic Area create(Collection<? extends Area> areas)
areas
- the areas used for creating the returned areastatic Area create(Shape shape)
Shape
. The returned area does
not take ownership of the given area.shape
- the shape used for creating the returned areaboolean contains(Vector2d point)
point
- the pointRectangle2d getMinimumBoundingRectangle()
double getSize()
List<MPolygon2d> getHoles()
MPolygon2d getLargestPolygon()
List<MPolygon2d> getPolygons()
List<MVector2d> getVertices()
boolean isEmpty()
boolean isSingular()
MAABB2d getBoundingRectangle()
MVector2d getCentroid()
Copyright © 2019 Solibri, Inc.. All rights reserved.