# SubgraphDepthLocater.h

    00001 /**********************************************************************
    00002  * $Id: SubgraphDepthLocater.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) 2006 Refractions Research Inc.
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  **********************************************************************/
    00015
    00016 #ifndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H
    00017 #define GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H
    00018
    00019 #include <vector>
    00020
    00021 #include <geos/geom/LineSegment.h> // for composition
    00022
    00023 // Forward declarations
    00024 namespace geos {
    00025         namespace geom {
    00026                 class Coordinate;
    00027         }
    00028         namespace geomgraph {
    00029                 class DirectedEdge;
    00030         }
    00031         namespace operation {
    00032                 namespace buffer {
    00033                         class BufferSubgraph;
    00034                         class DepthSegment;
    00035                 }
    00036         }
    00037 }
    00038
    00039 namespace geos {
    00040 namespace operation { // geos.operation
    00041 namespace buffer { // geos.operation.buffer
    00042
    00055 class SubgraphDepthLocater {
    00056
    00057 public:
    00058
    00059         SubgraphDepthLocater(std::vector<BufferSubgraph*> *newSubgraphs)
    00060                 :
    00061                 subgraphs(newSubgraphs)
    00062         {}
    00063
    00064         ~SubgraphDepthLocater() {}
    00065
    00066         int getDepth(const geom::Coordinate &p);
    00067
    00068 private:
    00069
    00070         std::vector<BufferSubgraph*> *subgraphs;
    00071
    00072         geom::LineSegment seg;
    00073
    00082         void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt,
    00083                         std::vector<DepthSegment*>& stabbedSegments);
    00084
    00094         void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt,
    00095                         std::vector<geomgraph::DirectedEdge*> *dirEdges,
    00096                         std::vector<DepthSegment*>& stabbedSegments);
    00097
    00107         void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt,
    00108                         geomgraph::DirectedEdge *dirEdge,
    00109                         std::vector<DepthSegment*>& stabbedSegments);
    00110
    00111 };
    00112
    00113
    00114 } // namespace geos::operation::buffer
    00115 } // namespace geos::operation
    00116 } // namespace geos
    00117
    00118 #endif // ndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H
    00119
    00120 /**********************************************************************
    00121  * $Log$
    00122  * Revision 1.2  2006/03/15 15:50:11  strk
    00123  * const correctness, cleanups
    00124  *
    00125  * Revision 1.1  2006/03/14 00:19:40  strk
    00126  * opBuffer.h split, streamlined headers in some (not all) files in operation/buffer/
    00127  *
    00128  **********************************************************************/
    00129