P
- Point implementation typepublic interface HyperplaneSubset<P extends Point<P>> extends Splittable<P,HyperplaneSubset<P>>, Sized
entire hyperplane
.
This interface is very similar to the Region
interface but has slightly different semantics. Whereas Region
instances represent sets
of points that can expand through all of the dimensions of a space, HyperplaneSubset
instances
are constrained to their containing hyperplane and are more accurately defined as Region
s
of the n-1
dimension subspace defined by the hyperplane. This makes the methods of this interface
have slightly different meanings as compared to their Region
counterparts. For example, consider
a triangular facet in Euclidean 3D space. The Sized.getSize()
method of this hyperplane subset does
not return the volume of the instance (which would be 0
) as a regular 3D region would, but
rather returns the area of the 2D polygon defined by the facet. Similarly, the classify(Point)
method returns RegionLocation.INSIDE
for points that lie inside of the 2D polygon defined by the
facet, instead of the RegionLocation.BOUNDARY
value that would be expected if the facet was considered
as a true 3D region with zero thickness.
Hyperplane
Modifier and Type | Method and Description |
---|---|
RegionLocation |
classify(P pt)
Classify a point with respect to the subset region.
|
P |
closest(P pt)
Return the closest point to the argument that is contained in the subset
(ie, not classified as
outside ), or null if no
such point exists. |
default boolean |
contains(P pt)
Return true if the hyperplane subset contains the given point, meaning that the point
lies on the hyperplane and is not on the outside of the subset region.
|
P |
getCentroid()
Get the centroid, or geometric center, of the hyperplane subset or null
if no centroid exists or one exists but is not unique.
|
Hyperplane<P> |
getHyperplane()
Get the hyperplane containing this instance.
|
boolean |
isEmpty()
Return true if this instance does not contain any points.
|
boolean |
isFull()
Return true if this instance contains all points in the
hyperplane.
|
List<? extends HyperplaneConvexSubset<P>> |
toConvex()
Convert this instance into a list of convex child subsets representing the same region.
|
HyperplaneSubset<P> |
transform(Transform<P> transform)
Return a new hyperplane subset resulting from the application of the given transform.
|
split
getSize, isFinite, isInfinite
Hyperplane<P> getHyperplane()
boolean isFull()
boolean isEmpty()
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 checkP closest(P pt)
outside
), or null if no
such point exists.pt
- the reference pointHyperplaneSubset<P> transform(Transform<P> transform)
transform
- the transform instance to applyList<? extends HyperplaneConvexSubset<P>> toConvex()
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.