00001 /*************************************************************************\ 00002 00003 Copyright 1999 The University of North Carolina at Chapel Hill. 00004 All Rights Reserved. 00005 00006 Permission to use, copy, modify and distribute this software and its 00007 documentation for educational, research and non-profit purposes, without 00008 fee, and without a written agreement is hereby granted, provided that the 00009 above copyright notice and the following three paragraphs appear in all 00010 copies. 00011 00012 IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE 00013 LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR 00014 CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE 00015 USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY 00016 OF NORTH CAROLINA HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH 00017 DAMAGES. 00018 00019 THE UNIVERSITY OF NORTH CAROLINA SPECIFICALLY DISCLAIM ANY 00020 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00021 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 00022 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 00023 NORTH CAROLINA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, 00024 UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 00025 00026 The authors may be contacted via: 00027 00028 US Mail: E. Larsen 00029 Department of Computer Science 00030 Sitterson Hall, CB #3175 00031 University of N. Carolina 00032 Chapel Hill, NC 27599-3175 00033 00034 Phone: (919)962-1749 00035 00036 EMail: geom@cs.unc.edu 00037 00038 00039 \**************************************************************************/ 00040 00041 #ifndef PQP_TRIDIST_H 00042 #define PQP_TRIDIST_H 00043 00044 #include "PQP_Compile.h" 00045 00046 // TriDist() 00047 // 00048 // computes the closest points on two triangles, and returns the 00049 // distance between them. 00050 // 00051 // s and t are the triangles, stored tri[point][dimension]. 00052 // 00053 // If the triangles are disjoint, p and q give the closest points of 00054 // s and t respectively. However, if the triangles overlap, p and q 00055 // are basically a random pair of points from the triangles, not 00056 // coincident points on the intersection of the triangles, as might 00057 // be expected. 00058 00059 PQP_REAL 00060 TriDist(PQP_REAL p[3], PQP_REAL q[3], 00061 const PQP_REAL s[3][3], const PQP_REAL t[3][3]); 00062 00063 #endif