GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net> 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 * Last port: algorithm/HCoordinate.java r386 (JTS-1.12+) 00018 * 00019 **********************************************************************/ 00020 00021 #ifndef GEOS_ALGORITHM_HCOORDINATE_H 00022 #define GEOS_ALGORITHM_HCOORDINATE_H 00023 00024 #include <geos/export.h> 00025 #include <iosfwd> 00026 00027 // Forward declarations 00028 namespace geos { 00029 namespace geom { 00030 class Coordinate; 00031 } 00032 } 00033 00034 namespace geos { 00035 namespace algorithm { // geos::algorithm 00036 00037 00044 class GEOS_DLL HCoordinate { 00045 00046 public: 00047 00048 friend std::ostream& operator<< (std::ostream& o, const HCoordinate& c); 00049 00060 static void intersection(const geom::Coordinate &p1, 00061 const geom::Coordinate &p2, 00062 const geom::Coordinate &q1, 00063 const geom::Coordinate &q2, 00064 geom::Coordinate &ret); 00065 00066 double x,y,w; 00067 00068 HCoordinate(); 00069 00070 HCoordinate(double _x, double _y, double _w); 00071 00072 HCoordinate(const geom::Coordinate& p); 00073 00082 HCoordinate(const geom::Coordinate& p1, const geom::Coordinate& p2); 00083 00084 HCoordinate(const geom::Coordinate& p1, const geom::Coordinate& p2, 00085 const geom::Coordinate& q1, const geom::Coordinate& q2); 00086 00087 HCoordinate(const HCoordinate &p1, const HCoordinate &p2); 00088 00089 double getX() const; 00090 00091 double getY() const; 00092 00093 void getCoordinate(geom::Coordinate &ret) const; 00094 00095 }; 00096 00097 std::ostream& operator<< (std::ostream& o, const HCoordinate& c); 00098 00099 } // namespace geos::algorithm 00100 } // namespace geos 00101 00102 #endif // GEOS_ALGORITHM_HCOORDINATE_H 00103