18 |
|
|
19 |
|
#include "otypes.h" |
20 |
|
|
21 |
+ |
#define OMARGIN (10*FTINY) /* margin around global cube */ |
22 |
+ |
|
23 |
|
#define MAXOBJFIL 63 /* maximum number of scene files */ |
24 |
|
|
25 |
|
char *progname; /* argv[0] */ |
63 |
|
infile = argv[++i]; |
64 |
|
break; |
65 |
|
case 'b': /* bounding cube */ |
66 |
< |
thescene.cuorg[0] = atof(argv[++i]) - FTINY; |
67 |
< |
thescene.cuorg[1] = atof(argv[++i]) - FTINY; |
68 |
< |
thescene.cuorg[2] = atof(argv[++i]) - FTINY; |
69 |
< |
thescene.cusize = atof(argv[++i]) + 2*FTINY; |
66 |
> |
thescene.cuorg[0] = atof(argv[++i]) - OMARGIN; |
67 |
> |
thescene.cuorg[1] = atof(argv[++i]) - OMARGIN; |
68 |
> |
thescene.cuorg[2] = atof(argv[++i]) - OMARGIN; |
69 |
> |
thescene.cusize = atof(argv[++i]) + 2*OMARGIN; |
70 |
|
break; |
71 |
|
case 'n': /* set limit */ |
72 |
|
objlim = atoi(argv[++i]); |
116 |
|
if (thescene.cusize == 0.0) { |
117 |
|
if (bbmin[0] <= bbmax[0]) { |
118 |
|
for (i = 0; i < 3; i++) { |
119 |
< |
bbmin[i] -= FTINY; |
120 |
< |
bbmax[i] += FTINY; |
119 |
> |
bbmin[i] -= OMARGIN; |
120 |
> |
bbmax[i] += OMARGIN; |
121 |
|
} |
122 |
|
VCOPY(thescene.cuorg, bbmin); |
123 |
|
for (i = 0; i < 3; i++) |