ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/tmesh.h
Revision: 2.2
Committed: Tue Mar 11 17:08:55 2003 UTC (21 years, 1 month ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 2.1: +20 -1 lines
Log Message:
First working version of new "mesh" primitive, obj2mesh converter

File Contents

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