--- ray/src/common/objset.c 1989/02/02 10:34:37 1.1 +++ ray/src/common/objset.c 1990/09/07 08:32:36 1.3 @@ -16,6 +16,8 @@ static char SCCSid[] = "$SunId$ LBL"; #include "object.h" +#include "otypes.h" + #define OSTSIZ 3037 /* object table size (a prime!) */ static OBJECT *ostable[OSTSIZ]; /* the object set table */ @@ -173,4 +175,28 @@ OCTREE ot; return; noderr: error(CONSISTENCY, "bad node in objset"); +} + + +nonsurfinset(orig, nobjs) /* check sets for non-surfaces */ +int orig, nobjs; +{ + int n; + register OBJECT *os; + register OBJECT i, t; + + for (n = 0; n < OSTSIZ; n++) { + if ((os = ostable[n]) == NULL) + continue; + while ((i = *os++) > 0) + while (i--) { + t = *os++; + if (t >= orig && t < orig+nobjs) { + t = objptr(t)->otype; + if (!issurface(t)) + return(1); + } + } + } + return(0); }