Back to index

radiance  4R0+20100331
func.h
Go to the documentation of this file.
00001 /* RCSid $Id: func.h,v 2.7 2004/03/30 16:13:01 schorsch Exp $ */
00002 /*
00003  * Header file for modifiers using function files.
00004  *
00005  * Include after ray.h
00006  */
00007 #ifndef _RAD_FUNC_H_
00008 #define _RAD_FUNC_H_
00009 
00010 #include  "ray.h"
00011 #include  "object.h"
00012 #include  "calcomp.h"
00013 
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017 
00018 #define  MAXEXPR     9      /* maximum expressions in modifier */
00019 
00020 typedef struct {
00021        EPNODE  *ep[MAXEXPR+1];            /* NULL-terminated expression list */
00022        char  *ctx;                 /* context (from file name) */
00023        XF  *f, *b;                 /* forward and backward transforms */
00024 } MFUNC;                    /* material function */
00025 
00026 extern XF  unitxf;          /* identity transform */
00027 extern XF  funcxf;          /* current transform */
00028 
00029 
00030 extern MFUNC *getfunc(OBJREC *m, int ff, unsigned int ef, int dofwd);
00031 extern void   freefunc(OBJREC *m);
00032 extern int    setfunc(OBJREC *m, RAY *r);
00033 extern void   loadfunc(char *fname);
00034 
00035        /* defined in noise3.c */
00036 extern void setnoisefuncs(void);
00037 
00038        /* defined in fprism.c */
00039 extern void setprismfuncs(void);
00040 
00041 
00042 
00043 #ifdef __cplusplus
00044 }
00045 #endif
00046 #endif /* _RAD_FUNC_H_ */
00047