Main Page | Namespace List | Class List | File List | Namespace Members | Class Members

geometry.h

00001 #ifndef _GEOMETRY_H 00002 #define _GEOMETRY_H 00003 00004 00005 /* 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00020 Boston, MA 02111-1307, USA. 00021 00022 file : geometry.h 00023 00024 */ 00025 00026 00027 #include <math.h> 00028 00029 00030 class Vertex; 00031 00032 00034 00040 namespace geometry 00041 { 00042 00046 typedef struct { 00047 double x; 00048 double y; 00049 } point; 00050 00051 00052 00056 typedef struct { 00057 point p1; 00058 point p2; 00059 } line; 00060 00061 00062 00068 double distance(const point& p1, const point& p2); 00069 00070 00071 00073 00079 double distance(const line& l, const point& p); 00080 00081 00082 00084 00090 double area(Vertex* p1, Vertex* p2, Vertex* p3); 00091 00092 00093 00095 00099 bool intersect(const line& l1, const line& l2); 00100 00101 00102 00103 }; 00104 00105 00106 #endif

Generated on Sun Sep 12 12:59:34 2004 for DelaunayMeshGenerator by doxygen 1.3.7