ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/tmesh.h
Revision: 2.5
Committed: Thu Jun 26 00:58:09 2003 UTC (21 years, 4 months ago) by schorsch
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1, rad5R3
Changes since 2.4: +6 -5 lines
Log Message:
Abstracted process and path handling for Windows.
Renamed FLOAT to RREAL because of conflict on Windows.
Added conditional compiles for some signal handlers.

File Contents

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