4 |
|
* |
5 |
|
* Include after ray.h |
6 |
|
*/ |
7 |
+ |
#ifndef _RAD_FUNC_H_ |
8 |
+ |
#define _RAD_FUNC_H_ |
9 |
|
|
10 |
< |
#include "copyright.h" |
10 |
> |
#include "calcomp.h" |
11 |
|
|
12 |
< |
#include "calcomp.h" |
12 |
> |
#ifdef __cplusplus |
13 |
> |
extern "C" { |
14 |
> |
#endif |
15 |
|
|
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 |
< |
XF *f, *b; /* forward and backward transforms */ |
21 |
> |
XF *fxp, *bxp; /* forward and backward transforms */ |
22 |
|
} MFUNC; /* material function */ |
23 |
|
|
24 |
|
extern XF unitxf; /* identity transform */ |
25 |
|
extern XF funcxf; /* current transform */ |
26 |
|
|
27 |
< |
#ifdef NOPROTO |
28 |
< |
|
25 |
< |
extern MFUNC *getfunc(); |
26 |
< |
extern void freefunc(); |
27 |
< |
extern int setfunc(); |
28 |
< |
extern void loadfunc(); |
29 |
< |
|
30 |
< |
#else |
31 |
< |
|
27 |
> |
extern void initfunc(void); |
28 |
> |
extern void set_eparams(const char *prms); |
29 |
|
extern MFUNC *getfunc(OBJREC *m, int ff, unsigned int ef, int dofwd); |
30 |
|
extern void freefunc(OBJREC *m); |
31 |
|
extern int setfunc(OBJREC *m, RAY *r); |
32 |
+ |
extern int worldfunc(const char *ctx, RAY *r); |
33 |
|
extern void loadfunc(char *fname); |
34 |
|
|
35 |
+ |
/* defined in noise3.c */ |
36 |
+ |
extern void setnoisefuncs(void); |
37 |
+ |
|
38 |
+ |
/* defined in fprism.c */ |
39 |
+ |
extern void setprismfuncs(void); |
40 |
+ |
|
41 |
+ |
|
42 |
+ |
#ifdef __cplusplus |
43 |
+ |
} |
44 |
|
#endif |
45 |
+ |
#endif /* _RAD_FUNC_H_ */ |
46 |
+ |
|