Interface PlaneSubset
-
- All Superinterfaces:
HyperplaneSubset<Vector3D>
,Sized
,Splittable<Vector3D,HyperplaneSubset<Vector3D>>
- All Known Subinterfaces:
ConvexPolygon3D
,PlaneConvexSubset
,Triangle3D
- All Known Implementing Classes:
AbstractConvexPolygon3D
,AbstractEmbeddedRegionPlaneSubset
,AbstractPlaneSubset
,EmbeddedAreaPlaneConvexSubset
,EmbeddedTreePlaneSubset
,SimpleTriangle3D
,VertexListConvexPolygon3D
public interface PlaneSubset extends HyperplaneSubset<Vector3D>
Interface representing a subset of points in a plane in Euclidean 3D space. Instances may represent finite, infinite, convex, non-convex, and/or disjoint regions of the plane.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
PlaneSubset.Embedded
Interface used to represent plane subsets as embedded 2D subspace regions.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Bounds3D
getBounds()
Get aBounds3D
object defining an axis-aligned bounding box containing all vertices for this subset.PlaneSubset.Embedded
getEmbedded()
Return an object containing the plane subset as an embedded 2D subspace region.Plane
getHyperplane()
Get the hyperplane containing this instance.Plane
getPlane()
Get the plane containing this subset.Vector3D
intersection(Line3D line)
Get the unique intersection of this plane subset with the given line.Vector3D
intersection(LineConvexSubset3D lineSubset)
Get the unique intersection of this plane subset with the given line subset.java.util.List<PlaneConvexSubset>
toConvex()
Convert this instance into a list of convex child subsets representing the same region.java.util.List<Triangle3D>
toTriangles()
Return a list of triangles representing the same subset region as this instance.-
Methods inherited from interface org.apache.commons.geometry.core.partitioning.HyperplaneSubset
classify, closest, contains, getCentroid, isEmpty, isFull, transform
-
Methods inherited from interface org.apache.commons.geometry.core.Sized
getSize, isFinite, isInfinite
-
Methods inherited from interface org.apache.commons.geometry.core.partitioning.Splittable
split
-
-
-
-
Method Detail
-
getPlane
Plane getPlane()
Get the plane containing this subset. This is equivalent togetHyperplane()
.- Returns:
- the plane containing this subset
- See Also:
getHyperplane()
-
getHyperplane
Plane getHyperplane()
Get the hyperplane containing this instance.- Specified by:
getHyperplane
in interfaceHyperplaneSubset<Vector3D>
- Returns:
- the hyperplane containing this instance
-
toConvex
java.util.List<PlaneConvexSubset> 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:
toConvex
in interfaceHyperplaneSubset<Vector3D>
- Returns:
- a list of hyperplane convex subsets representing the same subspace region as this instance
-
toTriangles
java.util.List<Triangle3D> toTriangles()
Return a list of triangles representing the same subset region as this instance. AnIllegalStateException
is thrown if the subset has infinite size and therefore cannot be converted to triangles. If the subset has zero size (is empty), an empty list is returned.- Returns:
- a list of triangles representing the same subset region as this instance
- Throws:
java.lang.IllegalStateException
- if the subset has infinite size and therefore cannot be converted to triangles
-
getBounds
Bounds3D getBounds()
Get aBounds3D
object defining an axis-aligned bounding box containing all vertices for this subset. Null is returned if the subset is infinite or does not contain any vertices.- Returns:
- the bounding box for this instance or null if no valid bounds could be determined
-
getEmbedded
PlaneSubset.Embedded getEmbedded()
Return an object containing the plane subset as an embedded 2D subspace region.- Returns:
- an object containing the plane subset as an embedded 2D subspace region
-
intersection
Vector3D intersection(Line3D line)
Get the unique intersection of this plane subset with the given line. Null is returned if no unique intersection point exists (ie, the line and plane are parallel or coincident) or the line does not intersect the plane subset.- Parameters:
line
- line to intersect with this plane subset- Returns:
- the unique intersection point between the line and this plane subset or null if no such point exists.
- See Also:
Plane.intersection(Line3D)
-
intersection
Vector3D intersection(LineConvexSubset3D lineSubset)
Get the unique intersection of this plane subset with the given line subset. Null is returned if the underlying line and plane do not have a unique intersection point (ie, they are parallel or coincident) or the intersection point is unique but is not contained in both the line subset and plane subset.- Parameters:
lineSubset
- line subset to intersect with- Returns:
- the unique intersection point between this plane subset and the argument or null if no such point exists.
- See Also:
Plane.intersection(Line3D)
-
-