Class Arc
- java.lang.Object
-
- org.hipparchus.geometry.spherical.oned.Arc
-
-
Constructor Summary
Constructors Constructor Description Arc(double lower, double upper, double tolerance)Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Region.LocationcheckPoint(double point)Check a point with respect to the arc.doublegetBarycenter()Get the barycenter of the arc.doublegetInf()Get the lower angular bound of the arc.doublegetOffset(double point)Get the distance (arc length) from a point to the edge of the arc.doublegetOffset(S1Point point)Get the distance (arc length) from a point to the edge of the arc.doublegetSize()Get the angular size of the arc.doublegetSup()Get the upper angular bound of the arc.doublegetTolerance()Get the tolerance below which angles are considered identical.
-
-
-
Constructor Detail
-
Arc
public Arc(double lower, double upper, double tolerance) throws MathIllegalArgumentExceptionSimple constructor.If either
loweris equals toupperor the interval exceeds \( 2 \pi \), the arc is considered to be the full circle and its initial defining boundaries will be forgotten.loweris not allowed to be greater thanupper(an exception is thrown in this case).lowerwill be canonicalized between 0 and \( 2 \pi \), and upper shifted accordingly, so thegetInf()andgetSup()may not return the value used at instance construction.- Parameters:
lower- lower angular bound of the arcupper- upper angular bound of the arctolerance- tolerance below which angles are considered identical- Throws:
MathIllegalArgumentException- if lower is greater than upper or tolerance is smaller thanSphere1D.SMALLEST_TOLERANCE
-
-
Method Detail
-
getInf
public double getInf()
Get the lower angular bound of the arc.- Returns:
- lower angular bound of the arc, always between 0 and \( 2 \pi \)
-
getSup
public double getSup()
Get the upper angular bound of the arc.
-
getSize
public double getSize()
Get the angular size of the arc.- Returns:
- angular size of the arc
-
getBarycenter
public double getBarycenter()
Get the barycenter of the arc.- Returns:
- barycenter of the arc
-
getTolerance
public double getTolerance()
Get the tolerance below which angles are considered identical.- Returns:
- tolerance below which angles are considered identical
-
checkPoint
public Region.Location checkPoint(double point)
Check a point with respect to the arc.- Parameters:
point- point to check- Returns:
- a code representing the point status: either
Region.Location.INSIDE,Region.Location.OUTSIDEorRegion.Location.BOUNDARY
-
getOffset
public double getOffset(double point)
Get the distance (arc length) from a point to the edge of the arc.This method does not use
getTolerance().
-
getOffset
public double getOffset(S1Point point)
Get the distance (arc length) from a point to the edge of the arc.This method does not use
getTolerance().
-
-