| 1 | greg | 2.9 | /* RCSid $Id: func.h,v 2.8 2011/02/18 00:40:25 greg Exp $ */ | 
| 2 | greg | 2.1 | /* | 
| 3 |  |  | * Header file for modifiers using function files. | 
| 4 | greg | 2.2 | * | 
| 5 |  |  | * Include after ray.h | 
| 6 |  |  | */ | 
| 7 | schorsch | 2.4 | #ifndef _RAD_FUNC_H_ | 
| 8 |  |  | #define _RAD_FUNC_H_ | 
| 9 | schorsch | 2.6 |  | 
| 10 | greg | 2.8 | #include "calcomp.h" | 
| 11 | schorsch | 2.6 |  | 
| 12 | schorsch | 2.4 | #ifdef __cplusplus | 
| 13 |  |  | extern "C" { | 
| 14 |  |  | #endif | 
| 15 | greg | 2.1 |  | 
| 16 |  |  | #define  MAXEXPR        9       /* maximum expressions in modifier */ | 
| 17 |  |  |  | 
| 18 |  |  | typedef struct { | 
| 19 |  |  | EPNODE  *ep[MAXEXPR+1];         /* NULL-terminated expression list */ | 
| 20 |  |  | char  *ctx;                     /* context (from file name) */ | 
| 21 | greg | 2.9 | XF  *fxp, *bxp;                 /* forward and backward transforms */ | 
| 22 | greg | 2.1 | } MFUNC;                        /* material function */ | 
| 23 |  |  |  | 
| 24 |  |  | extern XF  unitxf;              /* identity transform */ | 
| 25 |  |  | extern XF  funcxf;              /* current transform */ | 
| 26 |  |  |  | 
| 27 | greg | 2.9 | extern void     initfunc(void); | 
| 28 | greg | 2.8 | extern MFUNC    *getfunc(OBJREC *m, int ff, unsigned int ef, int dofwd); | 
| 29 | greg | 2.2 | extern void     freefunc(OBJREC *m); | 
| 30 |  |  | extern int      setfunc(OBJREC *m, RAY *r); | 
| 31 | greg | 2.9 | extern int      worldfunc(char *ctx, RAY *r); | 
| 32 | greg | 2.2 | extern void     loadfunc(char *fname); | 
| 33 |  |  |  | 
| 34 | schorsch | 2.7 | /* defined in noise3.c */ | 
| 35 | greg | 2.8 | extern void     setnoisefuncs(void); | 
| 36 | schorsch | 2.7 |  | 
| 37 |  |  | /* defined in fprism.c */ | 
| 38 | greg | 2.8 | extern void     setprismfuncs(void); | 
| 39 | schorsch | 2.7 |  | 
| 40 | schorsch | 2.4 |  | 
| 41 |  |  | #ifdef __cplusplus | 
| 42 |  |  | } | 
| 43 | greg | 2.2 | #endif | 
| 44 | schorsch | 2.4 | #endif /* _RAD_FUNC_H_ */ | 
| 45 |  |  |  |