00001 /* LIBGUL - Geometry Utility Library
00002 * Copyright (C) 1998-1999 Norbert Irmer
00003 *
00004 * This library is free software; you can redistribute it and/or
00005 * modify it under the terms of the GNU Library General Public
00006 * License as published by the Free Software Foundation; either
00007 * version 2 of the License, or (at your option) any later version.
00008 *
00009 * This library is distributed in the hope that it will be useful,
00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00012 * Library General Public License for more details.
00013 *
00014 * You should have received a copy of the GNU Library General Public
00015 * License along with this library; if not, write to the
00016 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017 * Boston, MA 02111-1307, USA.
00018 */
00019
00020 #ifndef GUGE_INTERSECT_H
00021 #define GUGE_INTERSECT_H
00022
00023 namespace guge
00024 {
00025
00026 using gul::point;
00027 using gul::triangle;
00028
00029 /* ----------------------------------------------------------------------
00030 calculate the intersection point of two lines (in 3D). It must exist,
00031 or the result will be wrong.
00032 ----------------------------------------------------------------------- */
00033 template< class T >
00034 bool RegularIntersectLines(
00035 const point<T>& A, /* point on line 1 */
00036 const point<T>& B, /* direction vector of line 1 */
00037 const point<T>& a, /* point on line 2 */
00038 const point<T>& b, /* direction vector of line 2 */
00039 T *lambda, /* parameter value of intersect. point (for line 1) */
00040 T *mu /* parameter value of intersect. point (for line 2) */
00041 );
00042
00043 /* ---------------------------------------------------------------------
00044 calculate the intersection line segment of two triangles
00045 ----------------------------------------------------------------------- */
00046 template< class T >
00047 bool IntersectTriangles( const triangle<T>& tri0, const triangle<T>& tri1,
00048 point<T> *retP1, point<T> *retP2 );
00049
00050 }
00051
00052 #endif
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001