1
/**********************************************************************
2
* $Id: FastSegmentSetIntersectionFinder.h 2263 2009-01-29 18:56:00Z mloskot $
4
* GEOS - Geometry Engine Open Source
5
* http://geos.refractions.net
7
* Copyright (C) 2006 Refractions Research Inc.
9
* This is free software; you can redistribute and/or modify it under
10
* the terms of the GNU Lesser General Public Licence as published
11
* by the Free Software Foundation.
12
* See the COPYING file for more information.
15
**********************************************************************/
17
#ifndef GEOS_NODING_FASTSEGMENTSETINTERSECTIONFINDER_H
18
#define GEOS_NODING_FASTSEGMENTSETINTERSECTIONFINDER_H
20
#include <geos/noding/SegmentString.h>
21
#include <geos/noding/MCIndexSegmentSetMutualIntersector.h>
24
//forward declarations
27
class SegmentIntersectionDetector;
28
class SegmentSetMutualIntersector;
29
//class MCIndexSegmentSetMutualIntersector : public SegmentSetMutualIntersector;
35
namespace noding { // geos::noding
38
* Finds if two sets of {@link SegmentStrings}s intersect.
40
* Uses indexing for fast performance and to optimize repeated tests
41
* against a target set of lines.
42
* Short-circuited to return as soon an intersection is found.
46
class FastSegmentSetIntersectionFinder
49
MCIndexSegmentSetMutualIntersector * segSetMutInt;
50
geos::algorithm::LineIntersector * lineIntersector;
54
FastSegmentSetIntersectionFinder( SegmentString::ConstVect * baseSegStrings);
56
~FastSegmentSetIntersectionFinder();
59
* Gets the segment set intersector used by this class.
60
* This allows other uses of the same underlying indexed structure.
62
* @return the segment set intersector used
64
SegmentSetMutualIntersector * getSegmentSetIntersector()
69
bool intersects( SegmentString::ConstVect * segStrings);
70
bool intersects( SegmentString::ConstVect * segStrings, SegmentIntersectionDetector * intDetector);
77
#endif // GEOS_NODING_FASTSEGMENTSETINTERSECTIONFINDER_H
78
/**********************************************************************
80
**********************************************************************/