| 31 |
|
typedef struct ray { |
| 32 |
|
unsigned long rno; /* unique ray number */ |
| 33 |
|
int rlvl; /* number of reflections for this ray */ |
| 34 |
< |
float rweight; /* cumulative weight of this ray */ |
| 34 |
> |
float rweight; /* cumulative weight (for termination) */ |
| 35 |
> |
COLOR rcoef; /* contribution coefficient w.r.t. parent */ |
| 36 |
|
short rtype; /* ray type */ |
| 37 |
|
short crtype; /* cumulative ray type */ |
| 38 |
< |
struct ray *parent; /* ray this originated from */ |
| 38 |
> |
const struct ray *parent; /* ray this originated from */ |
| 39 |
|
FVECT rorg; /* origin of ray */ |
| 40 |
|
FVECT rdir; /* normalized direction of ray */ |
| 41 |
|
double rmax; /* maximum distance (aft clipping plane) */ |
| 189 |
|
extern void ray_popen(int nadd); |
| 190 |
|
extern void ray_pclose(int nsub); |
| 191 |
|
/* defined in raytrace.c */ |
| 192 |
< |
extern int rayorigin(RAY *r, RAY *ro, int rt, double rw); |
| 192 |
> |
extern int rayorigin(RAY *r, int rt, const RAY *ro, const COLOR rc); |
| 193 |
|
extern void rayclear(RAY *r); |
| 194 |
|
extern void rayvalue(RAY *r); |
| 195 |
|
extern void rayhit(OBJECT *oset, RAY *r); |
| 199 |
|
extern void rayparticipate(RAY *r); |
| 200 |
|
extern void raytexture(RAY *r, OBJECT mod); |
| 201 |
|
extern int raymixture(RAY *r, OBJECT fore, OBJECT back, double coef); |
| 202 |
< |
extern double raydist(RAY *r, int flags); |
| 202 |
> |
extern void raycontrib(COLOR rc, const RAY *r, int flags); |
| 203 |
> |
extern double raydist(const RAY *r, int flags); |
| 204 |
|
extern double raynormal(FVECT norm, RAY *r); |
| 205 |
|
extern void newrayxf(RAY *r); |
| 206 |
|
extern void flipsurface(RAY *r); |