ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/tmesh.h
Revision: 2.4
Committed: Fri Jun 6 16:38:47 2003 UTC (20 years, 10 months ago) by schorsch
Content type: text/plain
Branch: MAIN
Changes since 2.3: +12 -11 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 /* RCSid $Id: tmesh.h,v 2.3 2003/03/12 04:59:04 greg Exp $ */
2 /*
3 * Header file for triangle mesh routines using barycentric coordinates
4 */
5 #ifndef _RAD_TMESH_H_
6 #define _RAD_TMESH_H_
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 #define TCALNAME "tmesh.cal" /* the name of our auxiliary file */
12
13 typedef struct {
14 int ax; /* major axis */
15 FLOAT tm[2][3]; /* transformation */
16 } BARYCCM;
17
18 #ifndef COSTOL
19 #define COSTOL 0.999995 /* cosine of tolerance for smoothing */
20 #endif
21
22 /* flat_tri() return values */
23 #define ISBENT 0 /* is not flat */
24 #define ISFLAT 1 /* is flat */
25 #define RVBENT 2 /* reversed and not flat */
26 #define RVFLAT 3 /* reversed and flat */
27 #define DEGEN -1 /* degenerate (zero area) */
28
29
30 int flat_tri(FVECT v1, FVECT v2, FVECT v3,
31 FVECT n1, FVECT n2, FVECT n3);
32 int comp_baryc(BARYCCM *bcm, FVECT v1, FVECT v2, FVECT v3);
33 void eval_baryc(FLOAT wt[3], FVECT p, BARYCCM *bcm);
34 int get_baryc(FLOAT wt[3], FVECT p, FVECT v1, FVECT v2, FVECT v3);
35 void put_baryc(BARYCCM *bcm, FLOAT com[][3], int n);
36
37
38 #ifdef __cplusplus
39 }
40 #endif
41 #endif /* _RAD_TMESH_H_ */
42