Class MCIndexPointSnapper.HotPixelSnapAction

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean addSnappedNode​(HotPixel hotPixel, NodedSegmentString segStr, int segIndex)
      Adds a new node (equal to the snap pt) to the specified segment if the segment passes through the hot pixel
      boolean isNodeAdded()
      Reports whether the HotPixel caused a node to be added in any target segmentString (including its own).
      void select​(MonotoneChain mc, int startIndex)
      Check if a segment of the monotone chain intersects the hot pixel vertex and introduce a snap node if so.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HotPixelSnapAction

        public HotPixelSnapAction​(HotPixel hotPixel,
                                  SegmentString parentEdge,
                                  int hotPixelVertexIndex)
    • Method Detail

      • isNodeAdded

        public boolean isNodeAdded()
        Reports whether the HotPixel caused a node to be added in any target segmentString (including its own). If so, the HotPixel must be added as a node as well.
        Returns:
        true if a node was added in any target segmentString.
      • select

        public void select​(MonotoneChain mc,
                           int startIndex)
        Check if a segment of the monotone chain intersects the hot pixel vertex and introduce a snap node if so. Optimized to avoid noding segments which contain the vertex (which otherwise would cause every vertex to be noded).
        Overrides:
        select in class MonotoneChainSelectAction
        Parameters:
        mc - the parent chain
        startIndex - the index of the start vertex of the segment being processed
      • addSnappedNode

        public boolean addSnappedNode​(HotPixel hotPixel,
                                      NodedSegmentString segStr,
                                      int segIndex)
        Adds a new node (equal to the snap pt) to the specified segment if the segment passes through the hot pixel
        Parameters:
        segStr -
        segIndex -
        Returns:
        true if a node was added to the segment