GEOS 3.4.2

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

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
24 #ifdef _MSC_VER
25 #pragma warning(push)
26 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
27 #endif
28
29 // Forward declarations
30 namespace geos {
31 namespace geomgraph {
32 class Edge;
33 namespace index {
34 class SegmentIntersector;
35 class SweepLineEvent;
36 }
37 }
38 }
39
40 namespace geos {
41 namespace geomgraph { // geos::geomgraph
42 namespace index { // geos::geomgraph::index
43
53 class GEOS_DLL SimpleMCSweepLineIntersector: public EdgeSetIntersector {
54
55 public:
56
57 SimpleMCSweepLineIntersector();
58
59 virtual ~SimpleMCSweepLineIntersector();
60
61 void computeIntersections(std::vector<Edge*> *edges,
62 SegmentIntersector *si, bool testAllSegments);
63
64 void computeIntersections(std::vector<Edge*> *edges0,
65 std::vector<Edge*> *edges1,
66 SegmentIntersector *si);
67
68 protected:
69
70 std::vector<SweepLineEvent*> events;
71
72 // statistics information
73 int nOverlaps;
74
75 private:
76 void add(std::vector<Edge*> *edges);
77
78 void add(std::vector<Edge*> *edges,void* edgeSet);
79
80 void add(Edge *edge,void* edgeSet);
81
82 void prepareEvents();
83
84 void computeIntersections(SegmentIntersector *si);
85
86 void processOverlaps(int start, int end,
87 SweepLineEvent *ev0,
88 SegmentIntersector *si);
89 };
90
91 } // namespace geos.geomgraph.index
92 } // namespace geos.geomgraph
93 } // namespace geos
94
95 #ifdef _MSC_VER
96 #pragma warning(pop)
97 #endif
98
99 #endif // GEOS_GEOMGRAPH_INDEX_SIMPLEMCSWEEPLINEINTERSECTOR_H
100