BRL-CAD
tri_tri.h
Go to the documentation of this file.
1 /* T R I _ T R I . H
2  * BRL-CAD
3  *
4  * Copyright (c) 2004-2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 
21 /*----------------------------------------------------------------------*/
22 /* @file tri_tri.h */
23 /** @addtogroup tri_tri */
24 /** @{ */
25 
26 /**
27  * @brief
28  * Tomas Möller's triangle/triangle intersection routines from the article
29  *
30  * "A Fast Triangle-Triangle Intersection Test",
31  * Journal of Graphics Tools, 2(2), 1997
32  */
33 
34 #ifndef BN_TRI_TRI_H
35 #define BN_TRI_TRI_H
36 
37 #include "common.h"
38 #include "vmath.h"
39 #include "bn/defines.h"
40 
42 
43 BN_EXPORT extern int bn_tri_tri_isect_coplanar(point_t V0,
44  point_t V1,
45  point_t V2,
46  point_t U0,
47  point_t U1,
48  point_t U2,
49  int area_flag);
50 
51 BN_EXPORT extern int bn_tri_tri_isect(point_t V0,
52  point_t V1,
53  point_t V2,
54  point_t U0,
55  point_t U1,
56  point_t U2);
57 
58 BN_EXPORT extern int bn_tri_tri_isect_with_line(point_t V0,
59  point_t V1,
60  point_t V2,
61  point_t U0,
62  point_t U1,
63  point_t U2,
64  int *coplanar,
65  point_t *isectpt1,
66  point_t *isectp2);
67 
69 
70 #endif /* BN_TRI_TRI_H */
71 /** @} */
72 /*
73  * Local Variables:
74  * mode: C
75  * tab-width: 8
76  * indent-tabs-mode: t
77  * c-file-style: "stroustrup"
78  * End:
79  * ex: shiftwidth=4 tabstop=8
80  */
Header file for the BRL-CAD common definitions.
int bn_tri_tri_isect(point_t V0, point_t V1, point_t V2, point_t U0, point_t U1, point_t U2)
Definition: tri_tri.c:319
#define __BEGIN_DECLS
Definition: common.h:73
int bn_tri_tri_isect_coplanar(point_t V0, point_t V1, point_t V2, point_t U0, point_t U1, point_t U2, int area_flag)
Tomas Möller's triangle/triangle intersection routines from the article.
Definition: tri_tri.c:182
#define __END_DECLS
Definition: common.h:74
int bn_tri_tri_isect_with_line(point_t V0, point_t V1, point_t V2, point_t U0, point_t U1, point_t U2, int *coplanar, point_t *isectpt1, point_t *isectp2)
Definition: tri_tri.c:479