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

- File List

# SimpleMCSweepLineIntersector.h

    00001 /**********************************************************************
    00002  * $Id: SimpleMCSweepLineIntersector.h 2556 2009-06-06 22:22:28Z strk $
    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_SIMPLEMCSWEEPLINEINTERSECTOR_H
    00018 #define GEOS_GEOMGRAPH_INDEX_SIMPLEMCSWEEPLINEINTERSECTOR_H
    00019
    00020 #include <geos/export.h>
    00021 #include <vector>
    00022
    00023 #include <geos/geomgraph/index/EdgeSetIntersector.h> // for inheritance
    00024
    00025 // Forward declarations
    00026 namespace geos {
    00027         namespace geomgraph {
    00028                 class Edge;
    00029                 namespace index {
    00030                         class SegmentIntersector;
    00031                         class SweepLineEvent;
    00032                 }
    00033         }
    00034 }
    00035
    00036 namespace geos {
    00037 namespace geomgraph { // geos::geomgraph
    00038 namespace index { // geos::geomgraph::index
    00039
    00049 class GEOS_DLL SimpleMCSweepLineIntersector: public EdgeSetIntersector {
    00050
    00051 public:
    00052
    00053         SimpleMCSweepLineIntersector();
    00054
    00055         virtual ~SimpleMCSweepLineIntersector();
    00056
    00057         void computeIntersections(std::vector<Edge*> *edges,
    00058                         SegmentIntersector *si, bool testAllSegments);
    00059
    00060         void computeIntersections(std::vector<Edge*> *edges0,
    00061                         std::vector<Edge*> *edges1,
    00062                         SegmentIntersector *si);
    00063
    00064 protected:
    00065
    00066         std::vector<SweepLineEvent*> events;
    00067
    00068         // statistics information
    00069         int nOverlaps;
    00070
    00071 private:
    00072         void add(std::vector<Edge*> *edges);
    00073
    00074         void add(std::vector<Edge*> *edges,void* edgeSet);
    00075
    00076         void add(Edge *edge,void* edgeSet);
    00077
    00078         void prepareEvents();
    00079
    00080         void computeIntersections(SegmentIntersector *si);
    00081
    00082         void processOverlaps(int start, int end,
    00083                         SweepLineEvent *ev0,
    00084                         SegmentIntersector *si);
    00085 };
    00086
    00087
    00088
    00089 } // namespace geos.geomgraph.index
    00090 } // namespace geos.geomgraph
    00091 } // namespace geos
    00092
    00093 #endif // GEOS_GEOMGRAPH_INDEX_SIMPLEMCSWEEPLINEINTERSECTOR_H
    00094
    00095 /**********************************************************************
    00096  * $Log$
    00097  * Revision 1.1  2006/03/14 12:55:55  strk
    00098  * Headers split: geomgraphindex.h, nodingSnapround.h
    00099  *
    00100  **********************************************************************/
    00101