Class EmbeddedTreeGreatCircleSubset

    • Field Detail

      • region

        private final RegionBSPTree1S region
        The 1D region on the great circle.
    • Constructor Detail

      • EmbeddedTreeGreatCircleSubset

        public EmbeddedTreeGreatCircleSubset​(GreatCircle greatCircle)
        Construct a new, empty hyperplane subset for the given great circle.
        Parameters:
        greatCircle - great circle defining this instance
      • EmbeddedTreeGreatCircleSubset

        public EmbeddedTreeGreatCircleSubset​(GreatCircle circle,
                                             boolean full)
        Construct a new sub-region for the given great circle. If full is true, then the region will cover the entire circle; otherwise, it will be empty.
        Parameters:
        circle - great circle that the sub-region will belong to
        full - if true, the sub-region will cover the entire circle; otherwise it will be empty
      • EmbeddedTreeGreatCircleSubset

        public EmbeddedTreeGreatCircleSubset​(GreatCircle circle,
                                             RegionBSPTree1S region)
        Construct a new instance from its defining great circle and subspace region.
        Parameters:
        circle - great circle that the sub-region will belong to
        region - subspace region
    • Method Detail

      • transform

        public EmbeddedTreeGreatCircleSubset transform​(Transform<Point2S> transform)
        Return a new hyperplane subset resulting from the application of the given transform. The current instance is not modified.
        Parameters:
        transform - the transform instance to apply
        Returns:
        new transformed hyperplane subset
      • 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
      • split

        public Split<EmbeddedTreeGreatCircleSubset> split​(Hyperplane<Point2S> splitter)
        Split this instance with the given hyperplane.

        In all cases, the current instance is not modified. However, In order to avoid unnecessary copying, this method will use the current instance as the split value when the instance lies entirely on the plus or minus side of the splitter. For example, if this instance lies entirely on the minus side of the splitter, the sub great circle returned by Split.getMinus() will be this instance. Similarly, Split.getPlus() will return the current instance if it lies entirely on the plus side. Callers need to make special note of this, since this class is mutable.

        Parameters:
        splitter - the hyperplane to split this object with.
        Returns:
        result of the split operation
      • add

        public void add​(GreatArc arc)
        Add an arc to this instance.
        Parameters:
        arc - arc to add
        Throws:
        java.lang.IllegalArgumentException - if the given arc is not from a great circle equivalent to this instance
      • add

        public void add​(EmbeddedTreeGreatCircleSubset subcircle)
        Add the region represented by the given subcircle to this instance. The argument is not modified.
        Parameters:
        subcircle - subcircle to add
        Throws:
        java.lang.IllegalArgumentException - if the given subcircle is not from a great circle equivalent to this instance
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object