Class GreatArc

    • Field Detail

      • interval

        private final AngularInterval.Convex interval
        The interval representing the region of the great circle contained in the arc.
    • Constructor Detail

      • GreatArc

        GreatArc​(GreatCircle circle,
                 AngularInterval.Convex interval)
        Create a new instance from a great circle and the interval embedded in it.
        Parameters:
        circle - defining great circle instance
        interval - convex angular interval embedded in the great circle
    • Method Detail

      • getStartPoint

        public Point2S getStartPoint()
        Return the start point of the arc, or null if the arc represents the full space.
        Returns:
        the start point of the arc, or null if the arc represents the full space.
      • getEndPoint

        public Point2S getEndPoint()
        Return the end point of the arc, or null if the arc represents the full space.
        Returns:
        the end point of the arc, or null if the arc represents the full space.
      • getMidPoint

        public Point2S getMidPoint()
        Return the midpoint of the arc, or null if the arc represents the full space.
        Returns:
        the midpoint of the arc, or null if the arc represents the full space.
      • toConvex

        public java.util.List<GreatArc> toConvex()
        Convert this instance into a list of convex child subsets representing the same region. Implementations are not required to return an optimal convex subdivision of the current instance. They are free to return whatever subdivision is readily available.
        Specified by:
        toConvex in interface HyperplaneSubset<Point2S>
        Specified by:
        toConvex in class GreatCircleSubset
        Returns:
        a list of hyperplane convex subsets representing the same subspace region as this instance
      • transform

        public GreatArc transform​(Transform<Point2S> transform)
        Return a new hyperplane subset resulting from the application of the given transform. The current instance is not modified.

        Hyperplane convex subsets subjected to affine transformations remain convex.

        Specified by:
        transform in interface HyperplaneConvexSubset<Point2S>
        Specified by:
        transform in interface HyperplaneSubset<Point2S>
        Parameters:
        transform - the transform instance to apply
        Returns:
        new transformed hyperplane subset
      • reverse

        public GreatArc reverse()
        Reverse the orientation of the hyperplane for this instance, returning the result as a new instance. The returned subset contains the same points but has a reversed orientation.
        Specified by:
        reverse in interface HyperplaneConvexSubset<Point2S>
        Returns:
        a hyperplane convex subset representing the same region but with the opposite orientation.
      • toString

        public java.lang.String toString()
        Return a string representation of this great arc.

        In order to keep the string representation short but useful, the exact format of the return value depends on the properties of the arc. See below for examples.

        • Full arc
          • GreatArc[full= true, circle= GreatCircle[pole= (0.0, 0.0, 1.0), x= (1.0, 0.0, 0.0), y= (0.0, 1.0, 0.0)]
        • Non-full arc
          • GreatArc[start= (1.0, 1.5707963267948966), end= (2.0, 1.5707963267948966)
        Overrides:
        toString in class java.lang.Object