GEOS 3.6.2
SimpleMCSweepLineIntersector.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2005-2006 Refractions Research Inc.
7 * Copyright (C) 2001-2002 Vivid Solutions Inc.
8 *
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.
13 *
14 **********************************************************************/
15
16#ifndef GEOS_GEOMGRAPH_INDEX_SIMPLEMCSWEEPLINEINTERSECTOR_H
17#define GEOS_GEOMGRAPH_INDEX_SIMPLEMCSWEEPLINEINTERSECTOR_H
18
19#include <geos/export.h>
20#include <vector>
21
22#include <geos/geomgraph/index/EdgeSetIntersector.h> // for inheritance
23#include <geos/geomgraph/index/SegmentIntersector.h>
24
25#ifdef _MSC_VER
26#pragma warning(push)
27#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
28#endif
29
30// Forward declarations
31namespace geos {
32 namespace geomgraph {
33 class Edge;
34 namespace index {
35 // class SegmentIntersector;
36 class SweepLineEvent;
37 }
38 }
39}
40
41namespace geos {
42namespace geomgraph { // geos::geomgraph
43namespace index { // geos::geomgraph::index
44
54class GEOS_DLL SimpleMCSweepLineIntersector: public EdgeSetIntersector {
55
56public:
57
58 SimpleMCSweepLineIntersector();
59
60 virtual ~SimpleMCSweepLineIntersector();
61
62 void computeIntersections(std::vector<Edge*> *edges,
63 SegmentIntersector *si, bool testAllSegments);
64
65 void computeIntersections(std::vector<Edge*> *edges0,
66 std::vector<Edge*> *edges1,
67 SegmentIntersector *si);
68
69protected:
70
71 std::vector<SweepLineEvent*> events;
72
73 // statistics information
74 int nOverlaps;
75
76private:
77 void add(std::vector<Edge*> *edges);
78
79 void add(std::vector<Edge*> *edges,void* edgeSet);
80
81 void add(Edge *edge,void* edgeSet);
82
83 void prepareEvents();
84
85 void computeIntersections(SegmentIntersector *si);
86
87 void processOverlaps(int start, int end,
88 SweepLineEvent *ev0,
89 SegmentIntersector *si);
90};
91
92} // namespace geos.geomgraph.index
93} // namespace geos.geomgraph
94} // namespace geos
95
96#ifdef _MSC_VER
97#pragma warning(pop)
98#endif
99
100#endif // GEOS_GEOMGRAPH_INDEX_SIMPLEMCSWEEPLINEINTERSECTOR_H
101
Definition geomgraph/Edge.h:66
Contains classes that implement topology graphs.
Definition IndexedNestedRingTester.h:34
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25