public class LimitAngle extends Object implements Hyperplane<Sphere1D>
An hyperplane on the 1-sphere is an angle with an orientation.
Instances of this class are guaranteed to be immutable.
Constructor and Description |
---|
LimitAngle(S1Point location,
boolean direct,
double tolerance)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
LimitAngle |
copySelf()
Copy the instance.
|
S1Point |
getLocation()
Get the hyperplane location on the circle.
|
double |
getOffset(Point<Sphere1D> point)
Get the offset (oriented distance) of a point.
|
LimitAngle |
getReverse()
Get the reverse of the instance.
|
double |
getTolerance()
Get the tolerance below which points are considered to belong to the hyperplane.
|
boolean |
isDirect()
Check if the hyperplane orientation is direct.
|
Point<Sphere1D> |
project(Point<Sphere1D> point)
Project a point to the hyperplane.
|
boolean |
sameOrientationAs(Hyperplane<Sphere1D> other)
Check if the instance has the same orientation as another hyperplane.
|
SubLimitAngle |
wholeHyperplane()
Build a region covering the whole hyperplane.
|
ArcsSet |
wholeSpace()
Build a region covering the whole space.
|
public LimitAngle(S1Point location, boolean direct, double tolerance)
location
- location of the hyperplanedirect
- if true, the plus side of the hyperplane is towards
angles greater than location
tolerance
- tolerance below which angles are considered identicalpublic LimitAngle copySelf()
Since instances are immutable, this method directly returns the instance.
copySelf
in interface Hyperplane<Sphere1D>
public double getOffset(Point<Sphere1D> 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.
getOffset
in interface Hyperplane<Sphere1D>
point
- point to checkpublic boolean isDirect()
public LimitAngle getReverse()
Get a limit angle with reversed orientation with respect to the instance. A new object is built, the instance is untouched.
public SubLimitAngle wholeHyperplane()
Since this class represent zero dimension spaces which does
not have lower dimension sub-spaces, this method returns a dummy
implementation of a SubHyperplane
.
This implementation is only used to allow the SubHyperplane
class implementation to work properly, it should
not be used otherwise.
wholeHyperplane
in interface Hyperplane<Sphere1D>
public ArcsSet wholeSpace()
wholeSpace
in interface Hyperplane<Sphere1D>
IntervalsSet
instance)public boolean sameOrientationAs(Hyperplane<Sphere1D> other)
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.
sameOrientationAs
in interface Hyperplane<Sphere1D>
other
- other hyperplane to check against the instancepublic S1Point getLocation()
public Point<Sphere1D> project(Point<Sphere1D> point)
project
in interface Hyperplane<Sphere1D>
point
- point to projectpublic double getTolerance()
getTolerance
in interface Hyperplane<Sphere1D>
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.