Class AbstractSubHyperplane<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>,T extends Space,Q extends Point<T,Q>,F extends Hyperplane<T,Q,F,J>,J extends SubHyperplane<T,Q,F,J>>
- java.lang.Object
-
- org.hipparchus.geometry.partitioning.AbstractSubHyperplane<S,P,H,I,T,Q,F,J>
-
- Type Parameters:
S
- Type of the space.P
- Type of the points in space.H
- Type of the hyperplane.I
- Type of the sub-hyperplane.T
- Type of the sub-space.Q
- Type of the points in sub-space.F
- Type of the hyperplane.J
- Type of the sub-hyperplane.
- All Implemented Interfaces:
SubHyperplane<S,P,H,I>
- Direct Known Subclasses:
SubCircle
,SubLimitAngle
,SubLine
,SubOrientedPoint
,SubPlane
public abstract class AbstractSubHyperplane<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>,T extends Space,Q extends Point<T,Q>,F extends Hyperplane<T,Q,F,J>,J extends SubHyperplane<T,Q,F,J>> extends Object implements SubHyperplane<S,P,H,I>
This class implements the dimension-independent parts ofSubHyperplane
.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 inBSP 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,R extends Point<U,R>,F extends Hyperplane<U,R,F,J>,J extends SubHyperplane<U,R,F,J>>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description I
applyTransform(Transform<S,P,H,I,T,Q,F,J> transform)
Apply a transform to the instance.protected abstract I
buildNew(H hyper, Region<T,Q,F,J> remaining)
Build a sub-hyperplane from an hyperplane and a region.I
copySelf()
Copy the instance.H
getHyperplane()
Get the underlying hyperplane.Region<T,Q,F,J>
getRemainingRegion()
Get the remaining region of the hyperplane.double
getSize()
Get the size of the instance.boolean
isEmpty()
Check if the instance is empty.I
reunite(I other)
Compute the union of the instance and another sub-hyperplane.abstract SubHyperplane.SplitSubHyperplane<S,P,H,I>
split(H hyper)
Split the instance in two parts by an hyperplane.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hipparchus.geometry.partitioning.SubHyperplane
getInteriorPoint
-
-
-
-
Method Detail
-
buildNew
protected abstract I buildNew(H hyper, Region<T,Q,F,J> remaining)
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
public I copySelf()
Copy the instance.The instance created is completely independent from the original one. A deep copy is used, none of the underlying objects are shared (except for the nodes attributes and immutable objects).
-
getHyperplane
public H getHyperplane()
Get the underlying hyperplane.- Specified by:
getHyperplane
in interfaceSubHyperplane<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
- Returns:
- underlying hyperplane
-
getRemainingRegion
public Region<T,Q,F,J> 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.
-
reunite
public I reunite(I other)
Compute the union of the instance and another sub-hyperplane.- Specified by:
reunite
in interfaceSubHyperplane<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
- 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
public I applyTransform(Transform<S,P,H,I,T,Q,F,J> transform)
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
public abstract SubHyperplane.SplitSubHyperplane<S,P,H,I> split(H hyper)
Split the instance in two parts by an hyperplane.- Specified by:
split
in interfaceSubHyperplane<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
- 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
-
-