54 |
|
int outflags = IO_ALL; |
55 |
|
OBJECT startobj; |
56 |
|
int i; |
57 |
– |
|
58 |
– |
progname = argv[0]; |
57 |
|
|
58 |
+ |
progname = argv[0] = fixargv0(argv[0]); |
59 |
+ |
|
60 |
|
if ((libpath = getenv(ULIBVAR)) == NULL) |
61 |
|
libpath = DEFPATH; |
62 |
|
|
111 |
|
printf("\n"); |
112 |
|
|
113 |
|
startobj = nobjects; /* previous objects already converted */ |
114 |
< |
|
114 |
> |
|
115 |
|
for ( ; i < argc; i++) /* read new scene descriptions */ |
116 |
|
if (!strcmp(argv[i], "-")) { /* from stdin */ |
117 |
|
readobj(NULL); |
150 |
|
} |
151 |
|
|
152 |
|
mincusize = thescene.cusize / resolu - FTINY; |
153 |
< |
|
153 |
> |
|
154 |
|
for (i = startobj; i < nobjects; i++) /* add new objects */ |
155 |
|
addobject(&thescene, i); |
156 |
< |
|
156 |
> |
|
157 |
|
thescene.cutree = combine(thescene.cutree); /* optimize */ |
158 |
|
|
159 |
|
writeoct(outflags, &thescene, ofname); /* write structures to stdout */ |
220 |
|
|
221 |
|
if (in == O_MISS) |
222 |
|
return; /* no intersection */ |
223 |
< |
|
223 |
> |
|
224 |
|
if (istree(cu->cutree)) { |
225 |
|
/* do children */ |
226 |
|
cukid.cusize = cu->cusize * 0.5; |
245 |
|
/* add to full node */ |
246 |
|
objset(oset, cu->cutree); |
247 |
|
cukid.cusize = cu->cusize * 0.5; |
248 |
< |
|
248 |
> |
|
249 |
|
if (in==O_IN || oset[0] < objlim || cukid.cusize < mincusize) { |
250 |
|
/* add to set */ |
251 |
|
if (oset[0] >= MAXSET) { |