GEOS 3.2.1
|
00001 /********************************************************************** 00002 * $Id: HCoordinate.h 2556 2009-06-06 22:22:28Z strk $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 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 rev. 1.18 (JTS-1.9) 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 long double x,y,w; 00067 00068 HCoordinate(); 00069 00070 HCoordinate(long double _x, long double _y, long 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 long double getX() const; 00090 00091 long 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 00104 /********************************************************************** 00105 * $Log$ 00106 * Revision 1.4 2006/04/20 14:27:40 strk 00107 * HCoordinate class changed to use long double types internally, in order to improve computation precision 00108 * 00109 * Revision 1.3 2006/04/14 09:02:16 strk 00110 * Hadded output operator and debugging prints for HCoordinate. 00111 * 00112 * Revision 1.2 2006/04/04 11:37:01 strk 00113 * Port information + initialization lists in ctors 00114 * 00115 * Revision 1.1 2006/03/09 16:46:48 strk 00116 * geos::geom namespace definition, first pass at headers split 00117 * 00118 **********************************************************************/ 00119