| 13 |
|
#include "rtprocess.h" /* getpid() */ |
| 14 |
|
#include "resolu.h" |
| 15 |
|
#include "ray.h" |
| 16 |
+ |
#include "func.h" |
| 17 |
|
#include "source.h" |
| 18 |
|
#include "ambient.h" |
| 19 |
|
#include "random.h" |
| 19 |
– |
#include "paths.h" |
| 20 |
|
#include "pmapray.h" |
| 21 |
– |
|
| 22 |
– |
extern char *progname; /* global argv[0] */ |
| 23 |
– |
|
| 21 |
|
/* persistent processes define */ |
| 22 |
|
#ifdef F_SETLKW |
| 23 |
|
#define PERSIST 1 /* normal persist */ |
| 111 |
|
strcat(RFeatureList, RTRACE_FEATURES); |
| 112 |
|
if (argc > 1 && !strcmp(argv[1], "-features")) |
| 113 |
|
return feature_status(argc-2, argv+2); |
| 114 |
+ |
/* initialize calcomp routines */ |
| 115 |
+ |
initfunc(); |
| 116 |
|
/* add trace notify function */ |
| 117 |
|
for (i = 0; addobjnotify[i] != NULL; i++) |
| 118 |
|
; |
| 347 |
|
rval = setspectrsamp(CNDX, WLPART); |
| 348 |
|
if (rval < 0) |
| 349 |
|
error(USER, "unsupported spectral sampling"); |
| 350 |
< |
if (out_prims != NULL) { |
| 350 |
> |
if (sens_curve != NULL) |
| 351 |
> |
out_prims = NULL; |
| 352 |
> |
else if (out_prims != NULL) { |
| 353 |
|
if (!rval) |
| 354 |
|
error(WARNING, "spectral range incompatible with color output"); |
| 355 |
|
} else if (NCSAMP == 3) |
| 359 |
|
/* initialize object types */ |
| 360 |
|
initotypes(); |
| 361 |
|
/* initialize urand */ |
| 362 |
< |
if (rand_samp) { |
| 362 |
< |
srandom((long)time(0)); |
| 363 |
< |
initurand(0); |
| 364 |
< |
} else { |
| 365 |
< |
srandom(0L); |
| 366 |
< |
initurand(2048); |
| 367 |
< |
} |
| 362 |
> |
reset_random(); |
| 363 |
|
/* set up signal handling */ |
| 364 |
|
sigdie(SIGINT, "Interrupt"); |
| 365 |
|
#ifdef SIGHUP |