Class AbstractDistanceBasedHitDetector<H,​P>

    • Field Detail

      • m_MinimumPixelDifference

        protected int m_MinimumPixelDifference
        the minimum pixel difference to use for determining hit or miss.
    • Constructor Detail

      • AbstractDistanceBasedHitDetector

        public AbstractDistanceBasedHitDetector()
        Initializes the hit detector.
    • Method Detail

      • getDefaultMinimumPixelDifference

        protected int getDefaultMinimumPixelDifference()
        Returns the default minimum pixel difference.
        Returns:
        the minimum
      • setMinimumPixelDifference

        public void setMinimumPixelDifference​(int value)
        Sets the minimum pixel difference before a hit is declared.
        Parameters:
        value - the number of pixels
      • getMinimumPixelDifference

        public int getMinimumPixelDifference()
        Returns the minimum pixel difference before a hit is declared.
        Returns:
        the number of pixels
      • minimumPixelDifferenceTipText

        public String minimumPixelDifferenceTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • distance

        protected double distance​(Point2D p1,
                                  Point2D p2,
                                  Point2D p3)
        Returns the distance of p3 to the segment defined by p1,p2.
        Parameters:
        p1 - First point of the segment
        p2 - Second point of the segment
        p3 - Point to which we want to know the distance of the segment defined by p1,p2
        Returns:
        The distance of p3 to the segment defined by p1,p2