Class AbstractEmbeddedRegionPlaneSubset
java.lang.Object
org.apache.commons.geometry.euclidean.threed.AbstractPlaneSubset
org.apache.commons.geometry.euclidean.threed.AbstractEmbeddedRegionPlaneSubset
- All Implemented Interfaces:
Embedding<Vector3D,Vector2D>, HyperplaneSubset<Vector3D>, Splittable<Vector3D, HyperplaneSubset<Vector3D>>, RegionEmbedding<Vector3D, Vector2D>, Sized, PlaneSubset, PlaneSubset.Embedded
- Direct Known Subclasses:
EmbeddedAreaPlaneConvexSubset, EmbeddedTreePlaneSubset
abstract class AbstractEmbeddedRegionPlaneSubset
extends AbstractPlaneSubset
implements PlaneSubset.Embedded
Base class for
PlaneSubset implementations that use an embedded subspace region
to define their plane subsets.-
Nested Class Summary
Nested classes/interfaces inherited from interface PlaneSubset
PlaneSubset.Embedded -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EmbeddingPlaneThe plane containing the embedded region. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance in the given plane. -
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.protected Bounds3DCompute 3D bounds from a subspace boundary source.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.getPlane()Get the plane containing this subset.doublegetSize()Get the size of the instance.booleanisEmpty()Return true if this instance does not contain any points.booleanisFull()Return true if this instance contains all points in the hyperplane.Transform a subspace point into a space point.toString()toSubspace(Vector3D pt) Transform a space point into a subspace point.Methods inherited from class AbstractPlaneSubset
intersection, intersectionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Embedding
toSpace, toSubspaceMethods inherited from interface HyperplaneSubset
contains, transformMethods inherited from interface PlaneSubset
getBounds, getEmbedded, toConvex, toTrianglesMethods inherited from interface PlaneSubset.Embedded
getSubspaceRegionMethods inherited from interface Sized
isFinite, isInfiniteMethods inherited from interface Splittable
split
-
Field Details
-
plane
The plane containing the embedded region.
-
-
Constructor Details
-
AbstractEmbeddedRegionPlaneSubset
AbstractEmbeddedRegionPlaneSubset(EmbeddingPlane plane) Construct a new instance in the given plane.- Parameters:
plane- plane containing the subset
-
-
Method Details
-
getPlane
Get the plane containing this subset. This is equivalent toPlaneSubset.getHyperplane().- Specified by:
getPlanein interfacePlaneSubset- Specified by:
getPlanein interfacePlaneSubset.Embedded- Returns:
- the plane containing this subset
- See Also:
-
getHyperplane
Get the hyperplane containing this instance.- Specified by:
getHyperplanein interfaceHyperplaneSubset<Vector3D>- Specified by:
getHyperplanein interfacePlaneSubset- Overrides:
getHyperplanein classAbstractPlaneSubset- Returns:
- the hyperplane containing this instance
-
isFull
public boolean isFull()Return true if this instance contains all points in the hyperplane.- Specified by:
isFullin interfaceHyperplaneSubset<Vector3D>- 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.- Specified by:
isEmptyin interfaceHyperplaneSubset<Vector3D>- Returns:
- true if this instance does not contain any points
-
getSize
-
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.
- Specified by:
getCentroidin interfaceHyperplaneSubset<Vector3D>- Returns:
- the centroid of the hyperplane subset or null if no unique centroid exists
- See Also:
-
toSpace
-
toSubspace
Transform a space point into a subspace point.- Specified by:
toSubspacein interfaceEmbedding<Vector3D,Vector2D> - Parameters:
pt- n-dimension point of the space- Returns:
- lower-dimension point of the subspace corresponding to the specified space point
- See Also:
-
classify
Classify a point with respect to the subset region. The point is classified as follows:- Specified by:
classifyin interfaceHyperplaneSubset<Vector3D>- Parameters:
pt- 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<Vector3D>- Parameters:
pt- the reference point- Returns:
- the closest point to the reference point that is contained in the subset, or null if no such point exists
-
toString
-
getBoundsFromSubspace
Compute 3D bounds from a subspace boundary source.- Parameters:
src- subspace boundary source- Returns:
- 3D bounds from the given embedded subspace boundary source or null if no valid bounds could be determined
-