- Type Parameters:
S
- Type of the embedding space.T
- Type of the embedded sub-space.
- All Implemented Interfaces:
SubHyperplane<S>
- Direct Known Subclasses:
SubCircle
,SubLimitAngle
,SubLine
,SubOrientedPoint
,SubPlane
SubHyperplane
.
sub-hyperplanes are obtained when parts of an hyperplane
are chopped off by other hyperplanes that
intersect it. The remaining part is a convex region. Such objects
appear in BSP trees
as the intersection of a cut
hyperplane with the convex region which it splits, the chopping
hyperplanes are the cut hyperplanes closer to the tree root.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hipparchus.geometry.partitioning.SubHyperplane
SubHyperplane.SplitSubHyperplane<U extends Space>
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractSubHyperplane
(Hyperplane<S> hyperplane, Region<T> remainingRegion) Build a sub-hyperplane from an hyperplane and a region. -
Method Summary
Modifier and TypeMethodDescriptionapplyTransform
(Transform<S, T> transform) Apply a transform to the instance.protected abstract AbstractSubHyperplane<S,
T> buildNew
(Hyperplane<S> hyper, Region<T> remaining) Build a sub-hyperplane from an hyperplane and a region.copySelf()
Copy the instance.Get the underlying hyperplane.Get the remaining region of the hyperplane.double
getSize()
Get the size of the instance.boolean
isEmpty()
Check if the instance is empty.reunite
(SubHyperplane<S> other) Compute the union of the instance and another sub-hyperplane.abstract SubHyperplane.SplitSubHyperplane<S>
split
(Hyperplane<S> hyper) Split the instance in two parts by an hyperplane.
-
Constructor Details
-
AbstractSubHyperplane
Build a sub-hyperplane from an hyperplane and a region.- Parameters:
hyperplane
- underlying hyperplaneremainingRegion
- remaining region of the hyperplane
-
-
Method Details
-
buildNew
Build a sub-hyperplane from an hyperplane and a region.- Parameters:
hyper
- underlying hyperplaneremaining
- remaining region of the hyperplane- Returns:
- a new sub-hyperplane
-
copySelf
Copy the instance.The instance created is completely independent of the original one. A deep copy is used, none of the underlying objects are shared (except for the nodes attributes and immutable objects).
- Specified by:
copySelf
in interfaceSubHyperplane<S extends Space>
- Returns:
- a new sub-hyperplane, copy of the instance
-
getHyperplane
Get the underlying hyperplane.- Specified by:
getHyperplane
in interfaceSubHyperplane<S extends Space>
- Returns:
- underlying hyperplane
-
getRemainingRegion
Get the remaining region of the hyperplane.The returned region is expressed in the canonical hyperplane frame and has the hyperplane dimension. For example a chopped hyperplane in the 3D euclidean is a 2D plane and the corresponding region is a convex 2D polygon.
- Returns:
- remaining region of the hyperplane
-
getSize
public double getSize()Get the size of the instance.- Specified by:
getSize
in interfaceSubHyperplane<S extends Space>
- Returns:
- the size of the instance (this is a length in 1D, an area in 2D, a volume in 3D ...)
-
reunite
Compute the union of the instance and another sub-hyperplane.- Specified by:
reunite
in interfaceSubHyperplane<S extends Space>
- Parameters:
other
- other sub-hyperplane to union (must be in the same hyperplane as the instance)- Returns:
- a new sub-hyperplane, union of the instance and other
-
applyTransform
Apply a transform to the instance.The instance must be a (D-1)-dimension sub-hyperplane with respect to the transform not a (D-2)-dimension sub-hyperplane the transform knows how to transform by itself. The transform will consist in transforming first the hyperplane and then the all region using the various methods provided by the transform.
- Parameters:
transform
- D-dimension transform to apply- Returns:
- the transformed instance
-
split
Split the instance in two parts by an hyperplane.- Specified by:
split
in interfaceSubHyperplane<S extends Space>
- Parameters:
hyper
- splitting hyperplane- Returns:
- an object containing both the part of the instance on the plus side of the hyperplane and the part of the instance on the minus side of the hyperplane
-
isEmpty
public boolean isEmpty()Check if the instance is empty.- Specified by:
isEmpty
in interfaceSubHyperplane<S extends Space>
- Returns:
- true if the instance is empty
-