Class LimitAngle
- All Implemented Interfaces:
Hyperplane<Sphere1D>
An hyperplane on the 1-sphere is an angle with an orientation.
Instances of this class are guaranteed to be immutable.
-
Constructor Summary
ConstructorDescriptionLimitAngle
(S1Point location, boolean direct, double tolerance) Simple constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopySelf()
Copy the instance.Build a sub-hyperplane covering nothing.Get the hyperplane location on the circle.double
Get the offset (oriented distance) of a point.Get the reverse of the instance.double
Get the tolerance below which points are considered to belong to the hyperplane.boolean
isDirect()
Check if the hyperplane orientation is direct.Project a point to the hyperplane.boolean
sameOrientationAs
(Hyperplane<Sphere1D> other) Check if the instance has the same orientation as another hyperplane.Build a region covering the whole hyperplane.Build a region covering the whole space.
-
Constructor Details
-
LimitAngle
public LimitAngle(S1Point location, boolean direct, double tolerance) throws MathIllegalArgumentException Simple constructor.- Parameters:
location
- location of the hyperplanedirect
- if true, the plus side of the hyperplane is towards angles greater thanlocation
tolerance
- tolerance below which angles are considered identical- Throws:
MathIllegalArgumentException
- if tolerance is smaller thanSphere1D.SMALLEST_TOLERANCE
-
-
Method Details
-
copySelf
Copy the instance.Since instances are immutable, this method directly returns the instance.
- Specified by:
copySelf
in interfaceHyperplane<Sphere1D>
- Returns:
- the instance itself
-
getOffset
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.
- Specified by:
getOffset
in interfaceHyperplane<Sphere1D>
- Parameters:
point
- point to check- Returns:
- offset of the point
-
isDirect
public boolean isDirect()Check if the hyperplane orientation is direct.- Returns:
- true if the plus side of the hyperplane is towards angles greater than hyperplane location
-
getReverse
Get the reverse of the instance.Get a limit angle with reversed orientation with respect to the instance. A new object is built, the instance is untouched.
- Returns:
- a new limit angle, with orientation opposite to the instance orientation
-
wholeHyperplane
Build a region covering the whole hyperplane.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 theSubHyperplane
class implementation to work properly, it should not be used otherwise.- Specified by:
wholeHyperplane
in interfaceHyperplane<Sphere1D>
- Returns:
- a dummy sub hyperplane
-
emptyHyperplane
Build a sub-hyperplane covering nothing.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 theSubHyperplane
class implementation to work properly, it should not be used otherwise.- Specified by:
emptyHyperplane
in interfaceHyperplane<Sphere1D>
- Returns:
- a sub-hyperplane covering nothing
-
wholeSpace
Build a region covering the whole space.- Specified by:
wholeSpace
in interfaceHyperplane<Sphere1D>
- Returns:
- a region containing the instance (really an
IntervalsSet
instance)
-
sameOrientationAs
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.
- Specified by:
sameOrientationAs
in interfaceHyperplane<Sphere1D>
- Parameters:
other
- other hyperplane to check against the instance- Returns:
- true if the instance and the other hyperplane have the same orientation
-
getLocation
Get the hyperplane location on the circle.- Returns:
- the hyperplane location
-
project
Project a point to the hyperplane.- Specified by:
project
in interfaceHyperplane<Sphere1D>
- Parameters:
point
- point to project- Returns:
- projected point
-
getTolerance
public double getTolerance()Get the tolerance below which points are considered to belong to the hyperplane.- Specified by:
getTolerance
in interfaceHyperplane<Sphere1D>
- Returns:
- tolerance below which points are considered to belong to the hyperplane
-