GEOS: MonotoneChain.h Source File

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

# MonotoneChain.h

    00001 /**********************************************************************
    00002  * $Id: MonotoneChain.h 1820 2006-09-06 16:54:23Z 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_MONOTONECHAIN_H
    00018 #define GEOS_GEOMGRAPH_INDEX_MONOTONECHAIN_H
    00019
    00020 #include <geos/geomgraph/index/SweepLineEventObj.h> // for inheritance
    00021 #include <geos/geomgraph/index/MonotoneChainEdge.h> // for inline
    00022
    00023 // Forward declarations
    00024 namespace geos {
    00025         namespace geomgraph {
    00026                 class Edge;
    00027                 namespace index {
    00028                         class SegmentIntersector;
    00029                         //class MonotoneChainEdge;
    00030                 }
    00031         }
    00032 }
    00033
    00034 namespace geos {
    00035 namespace geomgraph { // geos::geomgraph
    00036 namespace index { // geos::geomgraph::index
    00037
    00041 class MonotoneChain: public SweepLineEventOBJ {
    00042 private:
    00043         MonotoneChainEdge *mce;
    00044         int chainIndex;
    00045
    00046 public:
    00047
    00048         MonotoneChain(MonotoneChainEdge *newMce, int newChainIndex):
    00049                 mce(newMce),
    00050                 chainIndex(newChainIndex)
    00051         {}
    00052
    00053         ~MonotoneChain() {}
    00054
    00055         void computeIntersections(MonotoneChain *mc,SegmentIntersector *si) {
    00056                 mce->computeIntersectsForChain(chainIndex,*(mc->mce),mc->chainIndex,*si);
    00057         }
    00058 };
    00059
    00060
    00061
    00062
    00063 } // namespace geos.geomgraph.index
    00064 } // namespace geos.geomgraph
    00065 } // namespace geos
    00066
    00067 #endif
    00068
    00069 /**********************************************************************
    00070  * $Log$
    00071  * Revision 1.1  2006/03/14 12:55:55  strk
    00072  * Headers split: geomgraphindex.h, nodingSnapround.h
    00073  *
    00074  **********************************************************************/
    00075