ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/tmesh.h
Revision: 2.7
Committed: Thu Apr 15 23:51:04 2021 UTC (3 years ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R4, HEAD
Changes since 2.6: +3 -2 lines
Log Message:
feat(genbox,robjutil): Added Radiance normal smoothing support to wfobj library

File Contents

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