Interface Hyperplane<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
-
- 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.
- All Known Implementing Classes:
Circle
,LimitAngle
,Line
,OrientedPoint
,Plane
public interface Hyperplane<S extends Space,P extends Point<S,P>,H extends Hyperplane<S,P,H,I>,I extends SubHyperplane<S,P,H,I>>
This interface represents an hyperplane of a space.The most prominent place where hyperplane appears in space partitioning is as cutters. Each partitioning node in a
BSP tree
has a cutsub-hyperplane
which is either an hyperplane or a part of an hyperplane. In an n-dimensions euclidean space, an hyperplane is an (n-1)-dimensions hyperplane (for example a traditional plane in the 3D euclidean space). They can be more exotic objects in specific fields, for example a circle on the surface of the unit sphere.Note that this interface is not intended to be implemented by Hipparchus users, it is only intended to be implemented within the library itself. New methods may be added even for minor versions, which breaks compatibility for external implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description P
arbitraryPoint()
Get an arbitrary point in the hyperplane.H
copySelf()
Copy the instance.I
emptyHyperplane()
Build a sub-hyperplane covering nothing.double
getOffset(P point)
Get the offset (oriented distance) of a point.double
getTolerance()
Get the tolerance below which points are considered to belong to the hyperplane.P
moveToOffset(P point, double offset)
Move point up to specified offset.P
project(P point)
Project a point to the hyperplane.boolean
sameOrientationAs(H other)
Check if the instance has the same orientation as another hyperplane.I
wholeHyperplane()
Build a sub-hyperplane covering the whole hyperplane.Region<S,P,H,I>
wholeSpace()
Build a region covering the whole space.
-
-
-
Method Detail
-
copySelf
H 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 immutable objects).
- Returns:
- a new hyperplane, copy of the instance
-
getOffset
double getOffset(P point)
Get the offset (oriented distance) of a point.The offset is 0 if the point is on the underlying hyperplane, it is positive if the point is on one particular side of the hyperplane, and it is negative if the point is on the other side, according to the hyperplane natural orientation.
- Parameters:
point
- point to check- Returns:
- offset of the point
-
moveToOffset
P moveToOffset(P point, double offset)
Move point up to specified offset.Motion is orthogonal to the hyperplane
- Parameters:
point
- point to moveoffset
- desired offset- Returns:
- moved point at desired offset
- Since:
- 4.0
-
arbitraryPoint
P arbitraryPoint()
Get an arbitrary point in the hyperplane.- Returns:
- arbirary point in the hyperplane
- Since:
- 4.0
-
project
P project(P point)
Project a point to the hyperplane.- Parameters:
point
- point to project- Returns:
- projected point
-
getTolerance
double getTolerance()
Get the tolerance below which points are considered to belong to the hyperplane.- Returns:
- tolerance below which points are considered to belong to the hyperplane
-
sameOrientationAs
boolean sameOrientationAs(H other)
Check if the instance has the same orientation as another hyperplane.This method is expected to be called on parallel hyperplanes. The method should not re-check for parallelism, only for orientation, typically by testing something like the sign of the dot-products of normals.
- Parameters:
other
- other hyperplane to check against the instance- Returns:
- true if the instance and the other hyperplane have the same orientation
-
wholeHyperplane
I wholeHyperplane()
Build a sub-hyperplane covering the whole hyperplane.- Returns:
- a sub-hyperplane covering the whole hyperplane
-
emptyHyperplane
I emptyHyperplane()
Build a sub-hyperplane covering nothing.- Returns:
- a sub-hyperplane covering nothing
- Since:
- 1.4
-
-