Class InteriorAngleLinePathConnector.Minimize

  • Enclosing class:
    InteriorAngleLinePathConnector

    public static final class InteriorAngleLinePathConnector.Minimize
    extends InteriorAngleLinePathConnector
    Implementation of InteriorAngleLinePathConnector that chooses line subset connections that produce the smallest interior angles. Another way to visualize this is that when presented multiple connection options for a given line subset, this class will choose the option that points most to the left when viewed in the direction of the incoming line subset.
    • Constructor Detail

      • Minimize

        public Minimize()
    • Method Detail

      • isBetterAngle

        protected boolean isBetterAngle​(double newAngle,
                                        double previousAngle)
        Return true if newAngle represents a better interior angle than previousAngle.
        Specified by:
        isBetterAngle in class InteriorAngleLinePathConnector
        Parameters:
        newAngle - the new angle under consideration
        previousAngle - the previous best angle
        Returns:
        true if newAngle represents a better interior angle than previousAngle