GEOS: SimpleSweepLineIntersector.h Source File

GEOS 3.3.8

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

- File List

SimpleSweepLineIntersector.h
1 /**********************************************************************
2 * $Id: SimpleSweepLineIntersector.h 3255 2011-03-01 17:56:10Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************/
16
17 #ifndef GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
18 #define GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
19
20 #include <geos/export.h>
21 #include <vector>
22
23 #include <geos/geomgraph/index/EdgeSetIntersector.h> // for inheritance
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
31 namespace geos {
32 namespace geomgraph {
33 class Edge;
34 namespace index {
35 class SegmentIntersector;
36 class SweepLineEvent;
37 }
38 }
39 }
40
41 namespace geos {
42 namespace geomgraph { // geos::geomgraph
43 namespace index { // geos::geomgraph::index
44
52 class GEOS_DLL SimpleSweepLineIntersector: public EdgeSetIntersector {
53
54 public:
55
56 SimpleSweepLineIntersector();
57
58 virtual ~SimpleSweepLineIntersector();
59
60 void computeIntersections(std::vector<Edge*> *edges,
61 SegmentIntersector *si,
62 bool testAllSegments);
63
64 void computeIntersections(std::vector<Edge*> *edges0,
65 std::vector<Edge*> *edges1,
66 SegmentIntersector *si);
67
68 private:
69
70 void add(std::vector<Edge*> *edges);
71
72 std::vector<SweepLineEvent*> events;
73
74 // statistics information
75 int nOverlaps;
76
77 void add(std::vector<Edge*> *edges, void* edgeSet);
78
79 void add(Edge *edge,void* edgeSet);
80
81 void prepareEvents();
82
83 void computeIntersections(SegmentIntersector *si);
84
85 void processOverlaps(int start, int end, SweepLineEvent *ev0,
86 SegmentIntersector *si);
87 };
88
89 } // namespace geos.geomgraph.index
90 } // namespace geos.geomgraph
91 } // namespace geos
92
93 #ifdef _MSC_VER
94 #pragma warning(pop)
95 #endif
96
97 #endif // GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
98
99 /**********************************************************************
100 * $Log$
101 * Revision 1.1 2006/03/14 12:55:55 strk
102 * Headers split: geomgraphindex.h, nodingSnapround.h
103 *
104 **********************************************************************/
105