14 |
|
|
15 |
|
#include "platform.h" |
16 |
|
#include "RpictSimulManager.h" |
17 |
+ |
#include "func.h" |
18 |
|
#include "ambient.h" |
19 |
|
#include "pmapray.h" |
20 |
|
#include "random.h" |
57 |
|
"AdaptiveShadowTesting\nOutputs=v,l\n" \ |
58 |
|
"OutputCS=RGB,XYZ,prims,spec\n" |
59 |
|
|
59 |
– |
|
60 |
|
// Exit program |
61 |
|
void |
62 |
|
quit(int code) /* quit program */ |
63 |
|
{ |
64 |
< |
if (nproc < 0) { |
65 |
< |
ray_pnprocs = -1; // hack to avoid cleanup in child |
66 |
< |
_exit(code); |
67 |
< |
} |
68 |
< |
exit(code); // parent still frees everything (*yawn*) |
64 |
> |
exit(code); // don't bother to free data structs |
65 |
|
} |
66 |
|
|
67 |
+ |
/* Set default options */ |
68 |
+ |
static void |
69 |
+ |
default_options(void) |
70 |
+ |
{ |
71 |
+ |
shadthresh = .05; |
72 |
+ |
shadcert = .5; |
73 |
+ |
srcsizerat = .25; |
74 |
+ |
directrelay = 1; |
75 |
+ |
ambacc = 0.2; |
76 |
+ |
ambres = 64; |
77 |
+ |
ambdiv = 512; |
78 |
+ |
ambssamp = 128; |
79 |
+ |
maxdepth = 7; |
80 |
+ |
} |
81 |
|
|
82 |
|
int |
83 |
|
main(int argc, char *argv[]) |
105 |
|
strcat(RFeatureList, RXPIECE_FEATURES); |
106 |
|
if (argc > 1 && !strcmp(argv[1], "-features")) |
107 |
|
return feature_status(argc-2, argv+2); |
108 |
+ |
/* initialize calcomp routines */ |
109 |
+ |
initfunc(); |
110 |
+ |
/* set defaults */ |
111 |
+ |
default_options(); |
112 |
|
/* option city */ |
113 |
|
for (i = 1; i < argc; i++) { |
114 |
|
/* expand arguments */ |