ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/objset.c
(Generate patch)

Comparing ray/src/common/objset.c (file contents):
Revision 1.1 by greg, Thu Feb 2 10:34:37 1989 UTC vs.
Revision 1.3 by greg, Fri Sep 7 08:32:36 1990 UTC

# Line 16 | Line 16 | static char SCCSid[] = "$SunId$ LBL";
16  
17   #include  "object.h"
18  
19 + #include  "otypes.h"
20 +
21   #define  OSTSIZ         3037            /* object table size (a prime!) */
22  
23   static OBJECT  *ostable[OSTSIZ];        /* the object set table */
# Line 173 | Line 175 | OCTREE  ot;
175          return;
176   noderr:
177          error(CONSISTENCY, "bad node in objset");
178 + }
179 +
180 +
181 + nonsurfinset(orig, nobjs)               /* check sets for non-surfaces */
182 + int  orig, nobjs;
183 + {
184 +        int  n;
185 +        register OBJECT  *os;
186 +        register OBJECT  i, t;
187 +
188 +        for (n = 0; n < OSTSIZ; n++) {
189 +                if ((os = ostable[n]) == NULL)
190 +                        continue;
191 +                while ((i = *os++) > 0)
192 +                        while (i--) {
193 +                                t = *os++;
194 +                                if (t >= orig && t < orig+nobjs) {
195 +                                        t = objptr(t)->otype;
196 +                                        if (!issurface(t))
197 +                                                return(1);
198 +                                }
199 +                        }
200 +        }
201 +        return(0);
202   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines