Interface Hyperplane<P extends Point<P>>
- Type Parameters:
P
- Point implementation type
- All Known Subinterfaces:
EmbeddingHyperplane<P,
S>
- All Known Implementing Classes:
AbstractHyperplane
,CutAngle
,EmbeddingPlane
,GreatCircle
,Line
,OrientedPoint
,Plane
public interface Hyperplane<P extends Point<P>>
Interface representing a hyperplane, which in a space of dimension
n
is
a subspace of dimension n - 1
. (A hyperplane in Euclidean 3D space,
for example, is a 2 dimensional plane.)
Hyperplanes partition their surrounding space into 3 distinct sets: (1) points
lying on one side of the hyperplane, (2) points lying on the opposite side, and
(3) points lying on the hyperplane itself. One side of the hyperplane is labeled
as the plus side and the other as the minus side. The
offset
of a point in relation to a hyperplane is the distance
from the point to the hyperplane combined with the sign of the side that the point
lies on: points lying on the plus side of the hyperplane have a positive offsets,
those on the minus side have a negative offset, and those lying directly on the
hyperplane have an offset of zero.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionClassify a point with respect to this hyperplane.boolean
Return true if the given point lies on the hyperplane.double
Get the offset (oriented distance) of a point with respect to this instance.Project a point onto this instance.reverse()
Return a hyperplane that has the opposite orientation as this instance.boolean
similarOrientation
(Hyperplane<P> other) Return true if this instance has a similar orientation to the given hyperplane, meaning that they point in generally the same direction.span()
Return aHyperplaneConvexSubset
spanning this entire hyperplane.Transform this instance using the givenTransform
.
-
Method Details
-
offset
Get the offset (oriented distance) of a point with respect to this instance. Points with an offset of zero lie on the hyperplane itself.- Parameters:
point
- the point to compute the offset for- Returns:
- the offset of the point
-
classify
Classify a point with respect to this hyperplane.- Parameters:
point
- the point to classify- Returns:
- the relative location of the point with respect to this instance
-
contains
Return true if the given point lies on the hyperplane.- Parameters:
point
- the point to test- Returns:
- true if the point lies on the hyperplane
-
project
Project a point onto this instance.- Parameters:
point
- the point to project- Returns:
- the projection of the point onto this instance. The returned point lies on the hyperplane.
-
reverse
Hyperplane<P> reverse()Return a hyperplane that has the opposite orientation as this instance. That is, the plus side of this instance is the minus side of the returned instance and vice versa.- Returns:
- a hyperplane with the opposite orientation
-
transform
Transform this instance using the givenTransform
.- Parameters:
transform
- object to transform this instance with- Returns:
- a new, transformed hyperplane
-
similarOrientation
Return true if this instance has a similar orientation to the given hyperplane, meaning that they point in generally the same direction. This method is not used to determine exact equality of hyperplanes, but rather to determine whether two hyperplanes that contain the same points are parallel (point in the same direction) or anti-parallel (point in opposite directions).- Parameters:
other
- the hyperplane to compare with- Returns:
- true if the hyperplanes point in generally the same direction and could possibly be parallel
-
span
HyperplaneConvexSubset<P> span()Return aHyperplaneConvexSubset
spanning this entire hyperplane. The returned subset contains all points lying in this hyperplane and no more.- Returns:
- a
HyperplaneConvexSubset
containing all points lying in this hyperplane
-