Class FastSegmentSetIntersectionFinder

Hierarchy: Object , FastSegmentSetIntersectionFinder
public class FastSegmentSetIntersectionFinder
Finds if two sets of SegmentStrings intersect. Uses indexing for fast performance and to optimize repeated tests against a target set of lines. Short-circuited to return as soon an intersection is found. Immutable and thread-safe.

Other

  • version: 1.7
public FastSegmentSetIntersectionFinder(Collection baseSegStrings)
Creates an intersection finder against a given set of segment strings.
Parameters:
baseSegStrings - baseSegStrings the segment strings to search for intersections
public SegmentSetMutualIntersector getSegmentSetIntersector()
Gets the segment set intersector used by this class. This allows other uses of the same underlying indexed structure.
Returns:
the segment set intersector used
public boolean intersects(Collection segStrings)
Tests for intersections with a given set of target SegmentStrings.
Parameters:
segStrings - segStrings the SegmentStrings to test
Returns:
true if an intersection is found
public boolean intersects(Collection segStrings, SegmentIntersectionDetector intDetector)
Tests for intersections with a given set of target SegmentStrings. using a given SegmentIntersectionDetector.
Parameters:
segStrings - segStrings the SegmentStrings to test
intDetector - intDetector the intersection detector to use
Returns:
true if the detector reports intersections