public final class ConvexArea2S extends AbstractConvexHyperplaneBoundedRegion<Point2S,GreatArc> implements BoundarySource2S
AbstractConvexHyperplaneBoundedRegion.ConvexRegionBoundaryBuilder<P extends Point<P>,S extends HyperplaneConvexSubset<P>>
Modifier and Type | Method and Description |
---|---|
Stream<GreatArc> |
boundaryStream() |
static ConvexArea2S |
fromBounds(GreatCircle... bounds)
Create a convex area formed by the intersection of the negative half-spaces of the
given bounding great circles.
|
static ConvexArea2S |
fromBounds(Iterable<GreatCircle> bounds)
Create a convex area formed by the intersection of the negative half-spaces of the
given bounding great circles.
|
static ConvexArea2S |
fromPath(GreatArcPath path)
Construct a convex area from an arc path.
|
static ConvexArea2S |
fromVertexLoop(Collection<Point2S> vertices,
Precision.DoubleEquivalence precision)
Construct a convex area by creating great circles between adjacent vertices.
|
static ConvexArea2S |
fromVertices(Collection<Point2S> vertices,
boolean close,
Precision.DoubleEquivalence precision)
Construct a convex area from great circles between adjacent vertices.
|
static ConvexArea2S |
fromVertices(Collection<Point2S> vertices,
Precision.DoubleEquivalence precision)
Construct a convex area by creating great circles between adjacent vertices.
|
static ConvexArea2S |
full()
Return an instance representing the full spherical 2D space.
|
GreatArcPath |
getBoundaryPath()
Get a path instance representing the boundary of the area.
|
Point2S |
getCentroid() |
double[] |
getInteriorAngles()
Get an array of interior angles for the area.
|
double |
getSize() |
Split<ConvexArea2S> |
split(Hyperplane<Point2S> splitter) |
RegionBSPTree2S |
toTree()
Return a BSP tree representing the same region as this instance.
|
ConvexArea2S |
transform(Transform<Point2S> transform)
Return a new instance transformed by the argument.
|
GreatArc |
trim(HyperplaneConvexSubset<Point2S> sub) |
classify, getBoundaries, getBoundarySize, isEmpty, isFull, project, splitInternal, swapsInsideOutside, toString, transformInternal
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
of, of, toList
isFinite, isInfinite
public Stream<GreatArc> boundaryStream()
boundaryStream
in interface BoundarySource<GreatArc>
public GreatArcPath getBoundaryPath()
public double[] getInteriorAngles()
The order of the angles corresponds with the order of the boundaries returned
by AbstractConvexHyperplaneBoundedRegion.getBoundaries()
: if i
is an index into the boundaries list,
then angles[i]
is the angle between boundaries i
and (i+1) % boundariesSize
.
public Point2S getCentroid()
getCentroid
in interface Region<Point2S>
public Split<ConvexArea2S> split(Hyperplane<Point2S> splitter)
split
in interface Splittable<Point2S,HyperplaneBoundedRegion<Point2S>>
public RegionBSPTree2S toTree()
toTree
in interface BoundarySource2S
public ConvexArea2S transform(Transform<Point2S> transform)
transform
- transform to applypublic GreatArc trim(HyperplaneConvexSubset<Point2S> sub)
trim
in class AbstractConvexHyperplaneBoundedRegion<Point2S,GreatArc>
public static ConvexArea2S full()
public static ConvexArea2S fromVertices(Collection<Point2S> vertices, Precision.DoubleEquivalence precision)
vertices
- vertices to use to construct the areaprecision
- precision context used to create new great circle instancesfromVertexLoop(Collection, Precision.DoubleEquivalence)
public static ConvexArea2S fromVertexLoop(Collection<Point2S> vertices, Precision.DoubleEquivalence precision)
vertices
- vertices to use to construct the areaprecision
- precision context used to create new great circles instancesfromVertices(Collection, Precision.DoubleEquivalence)
public static ConvexArea2S fromVertices(Collection<Point2S> vertices, boolean close, Precision.DoubleEquivalence precision)
vertices
- vertices to use to construct the areaclose
- if true, an additional great circle will be created between the last and first vertexprecision
- precision context used to create new great circle instancespublic static ConvexArea2S fromPath(GreatArcPath path)
path
- path to construct the area frompublic static ConvexArea2S fromBounds(GreatCircle... bounds)
bounds
- great circles used to define the convex areaIllegalArgumentException
- if the given set of bounding great circles do not form a convex area,
meaning that there is no region that is on the minus side of all of the bounding circles.public static ConvexArea2S fromBounds(Iterable<GreatCircle> bounds)
bounds
- great circles used to define the convex areaIllegalArgumentException
- if the given set of bounding great circles do not form a convex area,
meaning that there is no region that is on the minus side of all of the bounding circles.Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.