ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/face.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: +11 -8 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 schorsch 2.4 /* RCSid $Id: face.h,v 2.3 2003/02/25 02:47:21 greg Exp $ */
2 greg 1.1 /*
3     * face.h - header for routines using polygonal faces.
4 greg 2.2 */
5 schorsch 2.4 #ifndef _RAD_FACE_H_
6     #define _RAD_FACE_H_
7     #ifdef __cplusplus
8     extern "C" {
9     #endif
10 greg 2.2
11 greg 2.3 #include "copyright.h"
12 greg 1.1
13     #define VERTEX(f,n) ((f)->va + 3*(n))
14    
15     typedef struct { /* a polygonal face */
16     FVECT norm; /* the plane's unit normal */
17 greg 1.3 FLOAT offset; /* plane equation: DOT(norm, v) == offset */
18     FLOAT area; /* area of face */
19     FLOAT *va; /* vertex array (o->oargs.farg) */
20 greg 1.1 short nv; /* # of vertices */
21     short ax; /* axis closest to normal */
22     } FACE;
23    
24 greg 2.2
25     extern FACE *getface(OBJREC *o);
26     extern void freeface(OBJREC *o);
27     extern int inface(FVECT p, FACE *f);
28    
29 schorsch 2.4
30     #ifdef __cplusplus
31     }
32 greg 2.2 #endif
33 schorsch 2.4 #endif /* _RAD_FACE_H_ */
34