GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 **********************************************************************/ 00014 00015 #ifndef GEOS_GEOM_TRIANGLE_H 00016 #define GEOS_GEOM_TRIANGLE_H 00017 00018 #include <geos/export.h> 00019 #include <geos/geom/Coordinate.h> 00020 00021 #include <geos/inline.h> 00022 00023 namespace geos { 00024 namespace geom { // geos::geom 00025 00031 class GEOS_DLL Triangle { 00032 public: 00033 Coordinate p0, p1, p2; 00034 00035 Triangle(const Coordinate& nP0, const Coordinate& nP1, const Coordinate& nP2) 00036 : 00037 p0(nP0), 00038 p1(nP1), 00039 p2(nP2) 00040 {} 00041 00049 void inCentre(Coordinate& resultPoint); 00050 00067 void circumcentre(Coordinate& resultPoint); 00068 00069 private: 00070 00085 double det(double m00 , double m01 , double m10 , double m11) const; 00086 00087 }; 00088 00089 00090 } // namespace geos::geom 00091 } // namespace geos 00092 00093 //#ifdef GEOS_INLINE 00094 //# include "geos/geom/Triangle.inl" 00095 //#endif 00096 00097 #endif // ndef GEOS_GEOM_TRIANGLE_H