Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

SimpleSweepLineIntersector.h

00001 /**********************************************************************
00002  * $Id: SimpleSweepLineIntersector.h 3255 2011-03-01 17:56:10Z mloskot $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2005-2006 Refractions Research Inc.
00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00009  *
00010  * This is free software; you can redistribute and/or modify it under
00011  * the terms of the GNU Lesser General Public Licence as published
00012  * by the Free Software Foundation. 
00013  * See the COPYING file for more information.
00014  *
00015  **********************************************************************/
00016 
00017 #ifndef GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
00018 #define GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
00019 
00020 #include <geos/export.h>
00021 #include <vector>
00022 
00023 #include <geos/geomgraph/index/EdgeSetIntersector.h> // for inheritance
00024 
00025 #ifdef _MSC_VER
00026 #pragma warning(push)
00027 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00028 #endif
00029 
00030 // Forward declarations
00031 namespace geos {
00032         namespace geomgraph {
00033                 class Edge;
00034                 namespace index {
00035                         class SegmentIntersector;
00036                         class SweepLineEvent;
00037                 }
00038         }
00039 }
00040 
00041 namespace geos {
00042 namespace geomgraph { // geos::geomgraph
00043 namespace index { // geos::geomgraph::index
00044 
00052 class GEOS_DLL SimpleSweepLineIntersector: public EdgeSetIntersector {
00053 
00054 public:
00055 
00056         SimpleSweepLineIntersector();
00057 
00058         virtual ~SimpleSweepLineIntersector();
00059 
00060         void computeIntersections(std::vector<Edge*> *edges,
00061                         SegmentIntersector *si,
00062                         bool testAllSegments);
00063 
00064         void computeIntersections(std::vector<Edge*> *edges0,
00065                         std::vector<Edge*> *edges1,
00066                         SegmentIntersector *si);
00067 
00068 private:
00069 
00070         void add(std::vector<Edge*> *edges);
00071 
00072         std::vector<SweepLineEvent*> events;
00073 
00074         // statistics information
00075         int nOverlaps;
00076 
00077         void add(std::vector<Edge*> *edges, void* edgeSet);
00078 
00079         void add(Edge *edge,void* edgeSet);
00080 
00081         void prepareEvents();
00082 
00083         void computeIntersections(SegmentIntersector *si);
00084 
00085         void processOverlaps(int start, int end, SweepLineEvent *ev0,
00086                         SegmentIntersector *si);
00087 };
00088 
00089 } // namespace geos.geomgraph.index
00090 } // namespace geos.geomgraph
00091 } // namespace geos
00092 
00093 #ifdef _MSC_VER
00094 #pragma warning(pop)
00095 #endif
00096 
00097 #endif // GEOS_GEOMGRAPH_INDEX_SIMPLESWEEPLINEINTERSECTOR_H
00098 
00099 /**********************************************************************
00100  * $Log$
00101  * Revision 1.1  2006/03/14 12:55:55  strk
00102  * Headers split: geomgraphindex.h, nodingSnapround.h
00103  *
00104  **********************************************************************/
00105 

Generated on Fri Nov 16 16:52:53 2012 for GEOS by  doxygen 1.3.9.1