--- ray/src/common/face.h 1989/02/02 10:34:15 1.1 +++ ray/src/common/face.h 2003/06/26 00:58:09 2.5 @@ -1,22 +1,34 @@ -/* Copyright (c) 1986 Regents of the University of California */ - -/* SCCSid "$SunId$ LBL" */ - +/* RCSid $Id: face.h,v 2.5 2003/06/26 00:58:09 schorsch Exp $ */ /* * face.h - header for routines using polygonal faces. - * - * 8/30/85 */ +#ifndef _RAD_FACE_H_ +#define _RAD_FACE_H_ +#ifdef __cplusplus +extern "C" { +#endif +#include "copyright.h" + #define VERTEX(f,n) ((f)->va + 3*(n)) typedef struct { /* a polygonal face */ FVECT norm; /* the plane's unit normal */ - double const; /* plane equation: DOT(norm, v) == const */ - double area; /* area of face */ - double *va; /* vertex array (o->oargs.farg) */ + RREAL offset; /* plane equation: DOT(norm, v) == offset */ + RREAL area; /* area of face */ + RREAL *va; /* vertex array (o->oargs.farg) */ short nv; /* # of vertices */ short ax; /* axis closest to normal */ } FACE; -extern FACE *getface(); + +extern FACE *getface(OBJREC *o); +extern void freeface(OBJREC *o); +extern int inface(FVECT p, FACE *f); + + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_FACE_H_ */ +