| 22 |
|
|
| 23 |
|
int nowarn = 0; /* supress warnings? */ |
| 24 |
|
|
| 25 |
< |
int objlim = 15; /* # of objects before split */ |
| 25 |
> |
int objlim = 9; /* # of objects before split */ |
| 26 |
|
|
| 27 |
|
int resolu = 16384; /* octree resolution limit */ |
| 28 |
|
|
| 39 |
|
) |
| 40 |
|
{ |
| 41 |
|
int nmatf = 0; |
| 42 |
< |
char *matinp[32]; |
| 42 |
> |
char pathnames[12800]; |
| 43 |
> |
char *pns = pathnames; |
| 44 |
> |
char *matinp[128]; |
| 45 |
> |
char *cp; |
| 46 |
|
int i, j; |
| 47 |
|
|
| 48 |
|
progname = argv[0]; |
| 59 |
|
case 'a': /* material file */ |
| 60 |
|
matinp[nmatf++] = argv[++i]; |
| 61 |
|
break; |
| 62 |
+ |
case 'l': /* library material */ |
| 63 |
+ |
cp = getpath(argv[++i], getrlibpath(), R_OK); |
| 64 |
+ |
if (cp == NULL) { |
| 65 |
+ |
sprintf(errmsg, |
| 66 |
+ |
"cannot find library material: '%s'", |
| 67 |
+ |
argv[i]); |
| 68 |
+ |
error(USER, errmsg); |
| 69 |
+ |
} |
| 70 |
+ |
matinp[nmatf++] = strcpy(pns, cp); |
| 71 |
+ |
while (*pns++) |
| 72 |
+ |
; |
| 73 |
+ |
break; |
| 74 |
|
case 'w': /* supress warnings */ |
| 75 |
|
nowarn = 1; |
| 76 |
|
break; |
| 221 |
|
objset(oset, cu->cutree); |
| 222 |
|
cukid.cusize = cu->cusize * 0.5; |
| 223 |
|
|
| 224 |
< |
if (oset[0] < objlim || cukid.cusize < mincusize) { |
| 224 |
> |
if (oset[0] < objlim || cukid.cusize < |
| 225 |
> |
(oset[0] < MAXSET ? mincusize : mincusize/256.0)) { |
| 226 |
|
/* add to set */ |
| 227 |
|
if (oset[0] >= MAXSET) { |
| 228 |
|
sprintf(errmsg, "set overflow in addobject (%s)", |