public final class CutAngle extends AbstractHyperplane<Point1S>
Hyperplanes split the spaces they are embedded in into three distinct parts:
the hyperplane itself, a plus side and a minus side. However, since spherical
space wraps around, a single oriented point is not sufficient to partition the space;
any point could be classified as being on the plus or minus side of a hyperplane
depending on the direction that the circle is traversed. The approach taken in this
class to address this issue is to (1) define a second, implicit cut point at 0pi
and
(2) define the domain of hyperplane points (for partitioning purposes) to be the
range [0, 2pi)
. Each hyperplane then splits the space into the intervals
[0, x]
and [x, 2pi)
, where x
is the location of the hyperplane.
One way to visualize this is to picture the circle as a cake that has already been
cut at 0pi
. Each hyperplane then specifies the location of the second
cut of the cake, with the plus and minus sides being the pieces thus cut.
Note that with the hyperplane partitioning rules described above, the hyperplane
at 0pi
is unique in that it has the entire space on one side (minus the hyperplane
itself) and no points whatsoever on the other. This is very different from hyperplanes in
Euclidean space, which always have infinitely many points on both sides.
Instances of this class are guaranteed to be immutable.
CutAngles
Modifier and Type | Method and Description |
---|---|
HyperplaneLocation |
classify(Point1S pt) |
boolean |
eq(CutAngle other,
Precision.DoubleEquivalence precision)
Return true if this instance should be considered equivalent to the argument, using the
given precision context for comparison.
|
boolean |
equals(Object obj) |
double |
getAzimuth()
Get the location of the hyperplane as a single value.
|
double |
getNormalizedAzimuth()
Get the location of the hyperplane as a single value, normalized
to the range
[0, 2pi) . |
Point1S |
getPoint()
Get the location of the hyperplane as a point.
|
int |
hashCode() |
boolean |
isPositiveFacing()
Return true if the hyperplane is oriented with its plus
side pointing toward increasing angles.
|
double |
offset(Point1S pt) |
Point1S |
project(Point1S pt) |
CutAngle |
reverse() |
boolean |
similarOrientation(Hyperplane<Point1S> other) |
HyperplaneConvexSubset<Point1S> |
span() |
String |
toString() |
CutAngle |
transform(Transform<Point1S> transform) |
contains, getPrecision
public Point1S getPoint()
getAzimuth()
public double getAzimuth()
cutAngle.getPoint().getAzimuth()
.getPoint()
,
Point1S.getAzimuth()
public double getNormalizedAzimuth()
[0, 2pi)
. This is equivalent to
cutAngle.getPoint().getNormalizedAzimuth()
.[0, 2pi)
getPoint()
,
Point1S.getNormalizedAzimuth()
public boolean isPositiveFacing()
public boolean eq(CutAngle other, Precision.DoubleEquivalence precision)
The instances are considered equivalent if they
other
- point to compare withprecision
- precision context to use for the comparisonPoint1S.eq(Point1S, Precision.DoubleEquivalence)
public HyperplaneLocation classify(Point1S pt)
classify
in interface Hyperplane<Point1S>
classify
in class AbstractHyperplane<Point1S>
public boolean similarOrientation(Hyperplane<Point1S> other)
public HyperplaneConvexSubset<Point1S> span()
Since there are no subspaces in spherical 1D space, this method effectively returns a stub implementation
of HyperplaneConvexSubset
, the main purpose of which is to support the proper functioning
of the partitioning code.
Copyright © 2016–2021 The Apache Software Foundation. All rights reserved.