GEOS
3.3.6
|
00001 /********************************************************************** 00002 * $Id: SubgraphDepthLocater.h 3245 2011-02-23 16:46:10Z strk $ 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 * Last port: operation/buffer/SubgraphDepthLocater.java r320 (JTS-1.12) 00017 * 00018 **********************************************************************/ 00019 00020 #ifndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H 00021 #define GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H 00022 00023 #include <geos/export.h> 00024 00025 #include <vector> 00026 00027 #include <geos/geom/LineSegment.h> // for composition 00028 00029 // Forward declarations 00030 namespace geos { 00031 namespace geom { 00032 class Coordinate; 00033 } 00034 namespace geomgraph { 00035 class DirectedEdge; 00036 } 00037 namespace operation { 00038 namespace buffer { 00039 class BufferSubgraph; 00040 class DepthSegment; 00041 } 00042 } 00043 } 00044 00045 namespace geos { 00046 namespace operation { // geos.operation 00047 namespace buffer { // geos.operation.buffer 00048 00060 class GEOS_DLL SubgraphDepthLocater { 00061 00062 public: 00063 00064 SubgraphDepthLocater(std::vector<BufferSubgraph*> *newSubgraphs) 00065 : 00066 subgraphs(newSubgraphs) 00067 {} 00068 00069 ~SubgraphDepthLocater() {} 00070 00071 int getDepth(const geom::Coordinate &p); 00072 00073 private: 00074 00075 std::vector<BufferSubgraph*> *subgraphs; 00076 00077 geom::LineSegment seg; 00078 00087 void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt, 00088 std::vector<DepthSegment*>& stabbedSegments); 00089 00099 void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt, 00100 std::vector<geomgraph::DirectedEdge*> *dirEdges, 00101 std::vector<DepthSegment*>& stabbedSegments); 00102 00112 void findStabbedSegments(const geom::Coordinate &stabbingRayLeftPt, 00113 geomgraph::DirectedEdge *dirEdge, 00114 std::vector<DepthSegment*>& stabbedSegments); 00115 00116 }; 00117 00118 00119 } // namespace geos::operation::buffer 00120 } // namespace geos::operation 00121 } // namespace geos 00122 00123 #endif // ndef GEOS_OP_BUFFER_SUBGRAPHDEPTHLOCATER_H 00124 00125 /********************************************************************** 00126 * $Log$ 00127 * Revision 1.2 2006/03/15 15:50:11 strk 00128 * const correctness, cleanups 00129 * 00130 * Revision 1.1 2006/03/14 00:19:40 strk 00131 * opBuffer.h split, streamlined headers in some (not all) files in operation/buffer/ 00132 * 00133 **********************************************************************/ 00134