--- ray/src/ot/oconv.c 1989/06/21 08:56:35 1.5 +++ ray/src/ot/oconv.c 1990/04/02 15:19:46 1.8 @@ -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; @@ -201,7 +203,7 @@ OBJECT obj; in = (*ofun[objptr(obj)->otype].funp)(objptr(obj), cu); - if (!in) + if (in == O_MISS) return; /* no intersection */ if (istree(cu->cutree)) { @@ -228,7 +230,7 @@ OBJECT obj; objset(oset, cu->cutree); cukid.cusize = cu->cusize * 0.5; - if (in == 2 || oset[0] < objlim || cukid.cusize < mincusize) { + if (in==O_IN || oset[0] < objlim || cukid.cusize < mincusize) { /* add to set */ if (oset[0] >= MAXSET) { sprintf(errmsg, @@ -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++) + if (isvolume(objptr(oset[j])->otype)) + addobject(&cukid, oset[j]); octkid(ot, i) = cukid.cutree; } cu->cutree = ot;