51 |
|
int directinvis = 0; /* sources invisible? */ |
52 |
|
double srcsizerat = .25; /* maximum ratio source size/dist. */ |
53 |
|
|
54 |
< |
double specthresh = .5; /* specular sampling threshold */ |
54 |
> |
double specthresh = .15; /* specular sampling threshold */ |
55 |
|
double specjitter = 1.; /* specular sampling jitter */ |
56 |
|
|
57 |
|
int maxdepth = 6; /* maximum recursion depth */ |
70 |
|
|
71 |
|
static RAY thisray; /* for our convenience */ |
72 |
|
|
73 |
< |
static int oputo(), oputd(), oputv(), oputl(), |
73 |
> |
static int oputo(), oputd(), oputv(), oputl(), oputL(), |
74 |
|
oputp(), oputn(), oputs(), oputw(), oputm(); |
75 |
|
|
76 |
|
static int (*ray_out[10])(), (*every_out[10])(); |
164 |
|
*table++ = oputv; |
165 |
|
castonly = 0; |
166 |
|
break; |
167 |
< |
case 'l': /* length */ |
167 |
> |
case 'l': /* effective distance */ |
168 |
|
*table++ = oputl; |
169 |
|
castonly = 0; |
170 |
|
break; |
171 |
+ |
case 'L': /* single ray length */ |
172 |
+ |
*table++ = oputL; |
173 |
+ |
break; |
174 |
|
case 'p': /* point */ |
175 |
|
*table++ = oputp; |
176 |
|
break; |
244 |
|
{ |
245 |
|
extern char *fgetword(); |
246 |
|
static float vf[3]; |
247 |
+ |
static double vd[3]; |
248 |
|
char buf[32]; |
249 |
|
register int i; |
250 |
|
|
263 |
|
vec[0] = vf[0]; vec[1] = vf[1]; vec[2] = vf[2]; |
264 |
|
break; |
265 |
|
case 'd': /* binary double */ |
266 |
< |
if (fread((char *)vec, sizeof(double), 3, fp) != 3) |
266 |
> |
if (fread((char *)vd, sizeof(double), 3, fp) != 3) |
267 |
|
return(-1); |
268 |
+ |
vec[0] = vd[0]; vec[1] = vd[1]; vec[2] = vd[2]; |
269 |
|
break; |
270 |
|
} |
271 |
|
return(0); |
329 |
|
|
330 |
|
|
331 |
|
static |
332 |
< |
oputl(r) /* print length */ |
332 |
> |
oputl(r) /* print effective distance */ |
333 |
|
register RAY *r; |
334 |
|
{ |
335 |
|
(*putreal)(r->rt); |
336 |
+ |
} |
337 |
+ |
|
338 |
+ |
|
339 |
+ |
static |
340 |
+ |
oputL(r) /* print single ray length */ |
341 |
+ |
register RAY *r; |
342 |
+ |
{ |
343 |
+ |
(*putreal)(r->rot); |
344 |
|
} |
345 |
|
|
346 |
|
|