⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rightmostedgefinder.h

📁 在Linux下做的QuadTree的程序
💻 H
字号:
/********************************************************************** * $Id: RightmostEdgeFinder.h 1820 2006-09-06 16:54:23Z mloskot $ * * GEOS - Geometry Engine Open Source * http://geos.refractions.net * * Copyright (C) 2006 Refractions Research Inc. * * This is free software; you can redistribute and/or modify it under * the terms of the GNU Lesser General Public Licence as published * by the Free Software Foundation.  * See the COPYING file for more information. * ********************************************************************** * * Last port: operation/buffer/RightmostEdgeFinder.java rev. 1.13 (JTS-1.7) * **********************************************************************/#ifndef GEOS_OP_BUFFER_RIGHTMOSTEDGEFINDER_H#define GEOS_OP_BUFFER_RIGHTMOSTEDGEFINDER_H#include <geos/geom/Coordinate.h> // for composition#include <vector>// Forward declarationsnamespace geos {	namespace geom {	}	namespace geomgraph {		class DirectedEdge;	}}namespace geos {namespace operation { // geos.operationnamespace buffer { // geos.operation.buffer/** * \brief * A RightmostEdgeFinder find the geomgraph::DirectedEdge in a list which has * the highest coordinate, and which is oriented L to R at that point. * (I.e. the right side is on the RHS of the edge.) */class RightmostEdgeFinder {private:	int minIndex;	geom::Coordinate minCoord;	geomgraph::DirectedEdge *minDe;	geomgraph::DirectedEdge *orientedDe;	void findRightmostEdgeAtNode();	void findRightmostEdgeAtVertex();	void checkForRightmostCoordinate(geomgraph::DirectedEdge *de);	int getRightmostSide(geomgraph::DirectedEdge *de, int index);	int getRightmostSideOfSegment(geomgraph::DirectedEdge *de, int i);public:	/** \brief	 * A RightmostEdgeFinder finds the geomgraph::DirectedEdge with the	 * rightmost coordinate.	 *	 * The geomgraph::DirectedEdge returned is guaranteed to have the R of	 * the world on its RHS.	 */	RightmostEdgeFinder();	geomgraph::DirectedEdge* getEdge();	geom::Coordinate& getCoordinate();	/// Note that only Forward DirectedEdges will be checked	void findEdge(std::vector<geomgraph::DirectedEdge*>* dirEdgeList);};/*public*/inline geomgraph::DirectedEdge*RightmostEdgeFinder::getEdge(){	return orientedDe;}/*public*/inline geom::Coordinate&RightmostEdgeFinder::getCoordinate(){	return minCoord;}} // namespace geos::operation::buffer} // namespace geos::operation} // namespace geos#endif // ndef GEOS_OP_BUFFER_RIGHTMOSTEDGEFINDER_H/********************************************************************** * $Log$ * Revision 1.3  2006/05/04 12:19:59  strk * Added note about findEdge() only scanning for forward DirectedEdges * * Revision 1.2  2006/04/05 09:20:25  strk * Added port informations and many assertion checking. * Fixed bug in getRightmostSide() method ( a "testing-only" corner case ) * * Revision 1.1  2006/03/14 00:19:40  strk * opBuffer.h split, streamlined headers in some (not all) files in operation/buffer/ * **********************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -