GEOS
3.3.2
|
00001 /********************************************************************** 00002 * $Id: HCoordinate.h 3338 2011-05-10 09:50:44Z strk $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net> 00008 * Copyright (C) 2005-2006 Refractions Research Inc. 00009 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00010 * 00011 * This is free software; you can redistribute and/or modify it under 00012 * the terms of the GNU Lesser General Public Licence as published 00013 * by the Free Software Foundation. 00014 * See the COPYING file for more information. 00015 * 00016 ********************************************************************** 00017 * 00018 * Last port: algorithm/HCoordinate.java r386 (JTS-1.12+) 00019 * 00020 **********************************************************************/ 00021 00022 #ifndef GEOS_ALGORITHM_HCOORDINATE_H 00023 #define GEOS_ALGORITHM_HCOORDINATE_H 00024 00025 #include <geos/export.h> 00026 #include <iosfwd> 00027 00028 // Forward declarations 00029 namespace geos { 00030 namespace geom { 00031 class Coordinate; 00032 } 00033 } 00034 00035 namespace geos { 00036 namespace algorithm { // geos::algorithm 00037 00038 00045 class GEOS_DLL HCoordinate { 00046 00047 public: 00048 00049 friend std::ostream& operator<< (std::ostream& o, const HCoordinate& c); 00050 00061 static void intersection(const geom::Coordinate &p1, 00062 const geom::Coordinate &p2, 00063 const geom::Coordinate &q1, 00064 const geom::Coordinate &q2, 00065 geom::Coordinate &ret); 00066 00067 double x,y,w; 00068 00069 HCoordinate(); 00070 00071 HCoordinate(double _x, double _y, double _w); 00072 00073 HCoordinate(const geom::Coordinate& p); 00074 00083 HCoordinate(const geom::Coordinate& p1, const geom::Coordinate& p2); 00084 00085 HCoordinate(const geom::Coordinate& p1, const geom::Coordinate& p2, 00086 const geom::Coordinate& q1, const geom::Coordinate& q2); 00087 00088 HCoordinate(const HCoordinate &p1, const HCoordinate &p2); 00089 00090 double getX() const; 00091 00092 double getY() const; 00093 00094 void getCoordinate(geom::Coordinate &ret) const; 00095 00096 }; 00097 00098 std::ostream& operator<< (std::ostream& o, const HCoordinate& c); 00099 00100 } // namespace geos::algorithm 00101 } // namespace geos 00102 00103 #endif // GEOS_ALGORITHM_HCOORDINATE_H 00104