Class CutAngle.CutAngleConvexSubset
- All Implemented Interfaces:
HyperplaneConvexSubset<Point1S>,HyperplaneSubset<Point1S>,Splittable<Point1S,,HyperplaneSubset<Point1S>> Sized
- Enclosing class:
CutAngle
HyperplaneConvexSubset implementation for spherical 1D space. Since there are no subspaces in 1D,
this is effectively a stub implementation, its main use being to allow for the correct functioning of
partitioning code.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CutAngleThe hyperplane containing for this instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClassify a point with respect to the subset region.Return the closest point to the argument that is contained in the subset (ie, not classified asoutside), or null if no such point exists.Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique.Get the hyperplane containing this instance.doublegetSize()Get the size of the instance.booleanisEmpty()Return true if this instance does not contain any points.booleanisFinite()Return true if the size of the instance is finite.booleanisFull()Return true if this instance contains all points in the hyperplane.booleanReturn true if the size of the instance is infinite.reverse()Reverse the orientation of the hyperplane for this instance, returning the result as a new instance.split(Hyperplane<Point1S> splitter) Split this instance with the given hyperplane.toConvex()Convert this instance into a list of convex child subsets representing the same region.toString()Return a new hyperplane subset resulting from the application of the given transform.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.geometry.core.partitioning.HyperplaneSubset
contains
-
Field Details
-
hyperplane
The hyperplane containing for this instance.
-
-
Constructor Details
-
CutAngleConvexSubset
CutAngleConvexSubset(CutAngle hyperplane) Simple constructor.- Parameters:
hyperplane- containing hyperplane instance
-
-
Method Details
-
getHyperplane
Get the hyperplane containing this instance.- Specified by:
getHyperplanein interfaceHyperplaneSubset<Point1S>- Returns:
- the hyperplane containing this instance
-
isFull
public boolean isFull()Return true if this instance contains all points in the hyperplane.This method always returns
false.- Specified by:
isFullin interfaceHyperplaneSubset<Point1S>- Returns:
- true if this instance contains all points in the hyperplane
-
isEmpty
public boolean isEmpty()Return true if this instance does not contain any points.This method always returns
false.- Specified by:
isEmptyin interfaceHyperplaneSubset<Point1S>- Returns:
- true if this instance does not contain any points
-
isInfinite
public boolean isInfinite()Return true if the size of the instance is infinite.This method always returns
false.- Specified by:
isInfinitein interfaceSized- Returns:
- true if the size of the instance is infinite
-
isFinite
public boolean isFinite()Return true if the size of the instance is finite.This method always returns
true. -
getSize
public double getSize()Get the size of the instance.This method always returns
0. -
getCentroid
Get the centroid, or geometric center, of the hyperplane subset or null if no centroid exists or one exists but is not unique. A centroid will not exist for empty or infinite subsets.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.
This method returns the point for the underlying hyperplane.
- Specified by:
getCentroidin interfaceHyperplaneSubset<Point1S>- Returns:
- the centroid of the hyperplane subset or null if no unique centroid exists
- See Also:
-
classify
Classify a point with respect to the subset region. The point is classified as follows:INSIDE- The point lies on the hyperplane and inside of the subset region.BOUNDARY- The point lies on the hyperplane and is on the boundary of the subset region.OUTSIDE- The point does not lie on the hyperplane or it does lie on the hyperplane but is outside of the subset region.
This method returns
RegionLocation.BOUNDARYif the point is on the hyperplane andRegionLocation.OUTSIDEotherwise.- Specified by:
classifyin interfaceHyperplaneSubset<Point1S>- Parameters:
point- the point to classify- Returns:
- classification of the point with respect to the hyperplane and subspace region
-
closest
Return the closest point to the argument that is contained in the subset (ie, not classified asoutside), or null if no such point exists.- Specified by:
closestin interfaceHyperplaneSubset<Point1S>- Parameters:
point- the reference point- Returns:
- the closest point to the reference point that is contained in the subset, or null if no such point exists
-
split
Split this instance with the given hyperplane.The parts resulting from a split operation with a convex subset are guaranteed to also be convex.
- Specified by:
splitin interfaceHyperplaneConvexSubset<Point1S>- Specified by:
splitin interfaceSplittable<Point1S,HyperplaneSubset<Point1S>> - Parameters:
splitter- the hyperplane to split this object with.- Returns:
- result of the split operation
-
toConvex
Convert this instance into a list of convex child subsets representing the same region. Implementations are not required to return an optimal convex subdivision of the current instance. They are free to return whatever subdivision is readily available.- Specified by:
toConvexin interfaceHyperplaneSubset<Point1S>- Returns:
- a list of hyperplane convex subsets representing the same subspace region as this instance
-
transform
Return a new hyperplane subset resulting from the application of the given transform. The current instance is not modified.Hyperplane convex subsets subjected to affine transformations remain convex.
- Specified by:
transformin interfaceHyperplaneConvexSubset<Point1S>- Specified by:
transformin interfaceHyperplaneSubset<Point1S>- Parameters:
transform- the transform instance to apply- Returns:
- new transformed hyperplane subset
-
reverse
Reverse the orientation of the hyperplane for this instance, returning the result as a new instance. The returned subset contains the same points but has a reversed orientation.- Specified by:
reversein interfaceHyperplaneConvexSubset<Point1S>- Returns:
- a hyperplane convex subset representing the same region but with the opposite orientation.
-
toString
-