GEOS  3.6.1
geomgraph/index/MonotoneChain.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  * Last port: geomgraph/index/MonotoneChain.java rev. 1.3 (JTS-1.7)
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_GEOMGRAPH_INDEX_MONOTONECHAIN_H
21 #define GEOS_GEOMGRAPH_INDEX_MONOTONECHAIN_H
22 
23 
24 #include <geos/export.h>
25 #include <geos/geomgraph/index/SweepLineEventObj.h> // for inheritance
26 #include <geos/geomgraph/index/MonotoneChainEdge.h> // for inline
27 
28 // Forward declarations
29 namespace geos {
30  namespace geomgraph {
31  namespace index {
32  class SegmentIntersector;
33  }
34  }
35 }
36 
37 namespace geos {
38 namespace geomgraph { // geos::geomgraph
39 namespace index { // geos::geomgraph::index
40 
44 class GEOS_DLL MonotoneChain: public SweepLineEventOBJ {
45 private:
46  MonotoneChainEdge *mce;
47  int chainIndex;
48 
49 public:
50 
51  MonotoneChain(MonotoneChainEdge *newMce, int newChainIndex):
52  mce(newMce),
53  chainIndex(newChainIndex)
54  {}
55 
56  ~MonotoneChain() {}
57 
58  void computeIntersections(MonotoneChain *mc,SegmentIntersector *si) {
59  mce->computeIntersectsForChain(chainIndex,*(mc->mce),mc->chainIndex,*si);
60  }
61 };
62 
63 
64 
65 
66 } // namespace geos.geomgraph.index
67 } // namespace geos.geomgraph
68 } // namespace geos
69 
70 #endif
71 
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
Definition: geomgraph/index/MonotoneChain.h:44