P
- Point implementation typepublic interface Region<P extends Point<P>> extends Sized
Modifier and Type | Method and Description |
---|---|
RegionLocation |
classify(P pt)
Classify the given point with respect to the region.
|
default boolean |
contains(P pt)
Return true if the given point is on the inside or boundary
of the region.
|
double |
getBoundarySize()
Get the size of the boundary of the region.
|
P |
getCentroid()
Get the centroid, or geometric center, of the region or null if no centroid
exists or one exists but is not unique.
|
boolean |
isEmpty()
Return true if the region is completely empty, ie all points in
the space are classified as
outside . |
boolean |
isFull()
Return true if the region spans the entire space.
|
P |
project(P pt)
Project a point onto the boundary of the region.
|
getSize, isFinite, isInfinite
boolean isFull()
outside
.boolean isEmpty()
outside
.double getBoundarySize()
d-1
dimension space. For example, in Euclidean space,
this will be a length in 2D and an area in 3D.P getCentroid()
The centroid of a geometric object is defined as the mean position of all points in the object, including interior points, vertices, and other points lying on the boundary. If a physical object has a uniform density, then its center of mass is the same as its geometric centroid.
RegionLocation classify(P pt)
pt
- the point to classifydefault boolean contains(P pt)
pt
- the point to testP project(P pt)
full
or empty
).pt
- pt to projectCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.