- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# HCoordinate.h

    00001 /**********************************************************************
    00002  * $Id: HCoordinate.h 1820 2006-09-06 16:54:23Z mloskot $
    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.17 (JTS-1.7)
    00018  *
    00019  **********************************************************************/
    00020
    00021 #ifndef GEOS_ALGORITHM_HCOORDINATE_H
    00022 #define GEOS_ALGORITHM_HCOORDINATE_H
    00023
    00024 #include <iosfwd>
    00025
    00026 // Forward declarations
    00027 namespace geos {
    00028         namespace geom {
    00029                 class Coordinate;
    00030         }
    00031 }
    00032
    00033 namespace geos {
    00034 namespace algorithm { // geos::algorithm
    00035
    00036
    00043 class HCoordinate {
    00044
    00045 public:
    00046
    00047         friend std::ostream& operator<< (std::ostream& o, const HCoordinate& c);
    00048
    00059         static void intersection(const geom::Coordinate &p1, const geom::Coordinate &p2,
    00060                 const geom::Coordinate &q1, const geom::Coordinate &q2, geom::Coordinate &ret);
    00061
    00062         long double x,y,w;
    00063
    00064         HCoordinate();
    00065
    00066         HCoordinate(long double _x, long double _y, long double _w);
    00067
    00068         HCoordinate(const geom::Coordinate& p);
    00069
    00070         HCoordinate(const HCoordinate &p1, const HCoordinate &p2);
    00071
    00072         long double getX() const;
    00073
    00074         long double getY() const;
    00075
    00076         void getCoordinate(geom::Coordinate &ret) const;
    00077
    00078 };
    00079
    00080 std::ostream& operator<< (std::ostream& o, const HCoordinate& c);
    00081
    00082 } // namespace geos::algorithm
    00083 } // namespace geos
    00084
    00085 #endif // GEOS_ALGORITHM_HCOORDINATE_H
    00086
    00087 /**********************************************************************
    00088  * $Log$
    00089  * Revision 1.4  2006/04/20 14:27:40  strk
    00090  * HCoordinate class changed to use long double types internally, in order to improve computation precision
    00091  *
    00092  * Revision 1.3  2006/04/14 09:02:16  strk
    00093  * Hadded output operator and debugging prints for HCoordinate.
    00094  *
    00095  * Revision 1.2  2006/04/04 11:37:01  strk
    00096  * Port information + initialization lists in ctors
    00097  *
    00098  * Revision 1.1  2006/03/09 16:46:48  strk
    00099  * geos::geom namespace definition, first pass at headers split
    00100  *
    00101  **********************************************************************/
    00102