19 |
|
#define RNUMBER size_t /* ray counter (>= sizeof pointer) */ |
20 |
|
#endif |
21 |
|
|
22 |
< |
#define MAXDIM 32 /* maximum number of dimensions */ |
22 |
> |
#define MAXDIM 32 /* maximum number of sampling dimensions */ |
23 |
|
|
24 |
|
/* ray type flags */ |
25 |
|
#define PRIMARY 01 /* original ray */ |
26 |
< |
#define SHADOW 02 /* ray to light source */ |
26 |
> |
#define RSHADOW 02 /* reflected ray to light source */ |
27 |
|
#define REFLECTED 04 /* reflected ray */ |
28 |
|
#define REFRACTED 010 /* refracted (bent) ray */ |
29 |
|
#define TRANS 020 /* transmitted/transferred ray */ |
30 |
< |
#define AMBIENT 040 /* ray scattered for interreflection */ |
31 |
< |
#define SPECULAR 0100 /* ray scattered for specular */ |
30 |
> |
#define RAMBIENT 040 /* reflected diffuse interreflection */ |
31 |
> |
#define RSPECULAR 0100 /* reflected specular */ |
32 |
> |
#define TSHADOW 0200 /* transmitted shadow */ |
33 |
> |
#define TAMBIENT 0400 /* transmitted ambient */ |
34 |
> |
#define TSPECULAR 01000 /* transmitted specular */ |
35 |
> |
#define SHADOW (RSHADOW|TSHADOW) |
36 |
> |
#define AMBIENT (RAMBIENT|TAMBIENT) |
37 |
> |
#define SPECULAR (RSPECULAR|TSPECULAR) |
38 |
|
|
39 |
|
/* reflected ray types */ |
40 |
< |
#define RAYREFL (SHADOW|REFLECTED|AMBIENT|SPECULAR) |
40 |
> |
#define RAYREFL (RSHADOW|REFLECTED|RAMBIENT|RSPECULAR) |
41 |
|
|
42 |
|
/* Arrange so double's come first for optimal alignment */ |
43 |
|
/* Pointers and long's come second for 64-bit mode */ |
67 |
|
int rsrc; /* source we're aiming for */ |
68 |
|
float rweight; /* cumulative weight (for termination) */ |
69 |
|
float gecc; /* scattering eccentricity coefficient */ |
70 |
< |
COLOR rcoef; /* contribution coefficient w.r.t. parent */ |
71 |
< |
COLOR pcol; /* pattern color */ |
72 |
< |
COLOR mcol; /* mirrored color contribution */ |
73 |
< |
COLOR rcol; /* returned radiance value */ |
70 |
> |
SCOLOR rcoef; /* contribution coefficient w.r.t. parent */ |
71 |
> |
SCOLOR pcol; /* pattern color */ |
72 |
> |
SCOLOR mcol; /* mirrored color contribution */ |
73 |
> |
SCOLOR rcol; /* returned radiance value */ |
74 |
|
COLOR cext; /* medium extinction coefficient */ |
75 |
|
COLOR albedo; /* medium scattering albedo */ |
76 |
|
short rflips; /* surface orientation has been reversed */ |
81 |
|
|
82 |
|
#define rayvalue(r) (*(r)->revf)(r) |
83 |
|
|
84 |
< |
#define raydistance(r) (bright((r)->mcol) > 0.5*bright((r)->rcol) ? \ |
84 |
> |
#define thrudir(r,v) ((r)->rod > 0 ^ DOT((r)->ron,v) > 0) |
85 |
> |
|
86 |
> |
#define raydistance(r) (pbright((r)->mcol) > 0.5*pbright((r)->rcol) ? \ |
87 |
|
(r)->rmt : (r)->rxt) |
88 |
|
|
89 |
|
#define rayreorient(r) if ((r)->rflips & 1) flipsurface(r); else |
205 |
|
/* defined in preload.c */ |
206 |
|
extern int load_os(OBJREC *op); |
207 |
|
extern void preload_objs(void); |
208 |
+ |
extern char *shm_boundary; |
209 |
+ |
extern void cow_memshare(void); |
210 |
+ |
extern void cow_doneshare(void); |
211 |
|
/* defined in raycalls.c */ |
212 |
|
extern void ray_init(char *otnm); |
213 |
|
extern void ray_trace(RAY *r); |
228 |
|
extern int ray_fifo_in(RAY *r); |
229 |
|
extern int ray_fifo_flush(void); |
230 |
|
/* defined in raytrace.c */ |
231 |
< |
extern int rayorigin(RAY *r, int rt, const RAY *ro, const COLOR rc); |
231 |
> |
extern int rayorigin(RAY *r, int rt, const RAY *ro, const SCOLOR rc); |
232 |
|
extern void rayclear(RAY *r); |
233 |
|
extern void raytrace(RAY *r); |
234 |
< |
extern int rayreject(OBJREC *o, RAY *r, double t); |
234 |
> |
extern int rayreject(OBJREC *o, RAY *r, double t, double rod); |
235 |
|
extern void rayhit(OBJECT *oset, RAY *r); |
236 |
|
extern void raycont(RAY *r); |
237 |
|
extern void raytrans(RAY *r); |
240 |
|
extern void rayparticipate(RAY *r); |
241 |
|
extern void raytexture(RAY *r, OBJECT mod); |
242 |
|
extern int raymixture(RAY *r, OBJECT fore, OBJECT back, double coef); |
243 |
< |
extern void raycontrib(RREAL rc[3], const RAY *r, int flags); |
243 |
> |
extern void raycontrib(SCOLOR rc, const RAY *r, int flags); |
244 |
|
extern double raydist(const RAY *r, int flags); |
245 |
|
extern double raynormal(FVECT norm, RAY *r); |
246 |
|
extern void newrayxf(RAY *r); |
251 |
|
extern int getrenderopt(int ac, char *av[]); |
252 |
|
extern void print_rdefaults(void); |
253 |
|
/* defined in srcdraw.c */ |
243 |
– |
extern void drawsources(COLOR *pic[], float *zbf[], |
244 |
– |
int x0, int xsiz, int y0, int ysiz); |
254 |
|
extern void init_drawsources(int rad); |
255 |
+ |
extern void drawsources(COLORV *pic[], RGBPRIMP primp, float *zbf[], |
256 |
+ |
int x0, int xsiz, int y0, int ysiz); |
257 |
|
/* defined in rt/initotypes.c */ |
258 |
|
extern void initotypes(void); |
259 |
|
/* module main procedures */ |