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.4 by greg, Wed Sep 19 08:26:02 1990 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines