--- ray/src/ot/oconv.c 1989/10/14 11:19:34 1.6 +++ ray/src/ot/oconv.c 1990/06/26 09:02:03 1.9 @@ -39,7 +39,9 @@ int nfiles = 0; /* number of object files */ double mincusize; /* minimum cube size from resolu */ +int (*addobjnotify[])() = {NULL}; /* new object notifier functions */ + main(argc, argv) /* convert object files to an octree */ int argc; char **argv; @@ -177,15 +179,15 @@ char *s; eputs(s) /* put string to stderr */ register char *s; { - static int inline = 0; + static int inln = 0; - if (!inline++) { + if (!inln++) { fputs(progname, stderr); fputs(": ", stderr); } fputs(s, stderr); if (*s && s[strlen(s)-1] == '\n') - inline = 0; + inln = 0; } @@ -250,9 +252,16 @@ OBJECT obj; if ((1<otype)) + addobject(&cukid, oset[j]); + /* then this object */ addobject(&cukid, obj); + /* volumes last */ for (j = 1; j <= oset[0]; j++) - addobject(&cukid, oset[j]); + if (isvolume(objptr(oset[j])->otype)) + addobject(&cukid, oset[j]); octkid(ot, i) = cukid.cutree; } cu->cutree = ot;