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

Comparing ray/src/ot/o_instance.c (file contents):
Revision 1.2 by greg, Fri Oct 13 20:08:08 1989 UTC vs.
Revision 1.3 by greg, Sat Oct 14 11:19:33 1989 UTC

# Line 72 | Line 72 | CUBE  *cu;
72                  vloc &= j;
73          }
74          if (vout == 0)                  /* all inside */
75 <                return(2);
75 >                return(O_IN);
76          if (vout < 8)                   /* some inside */
77 <                return(1);
77 >                return(O_HIT);
78          if (vloc)                       /* all to one side */
79 <                return(0);
79 >                return(O_MISS);
80                                          /* octree vertices in cube? */
81          for (j = 0; j < 3; j++)
82                  cumax[j] = (cumin[j] = cu->cuorg[j]) + cu->cusize;
# Line 91 | Line 91 | CUBE  *cu;
91                  if (j = plocate(vert[i], cumin, cumax))
92                          vloc &= j;
93                  else
94 <                        return(1);      /* vertex inside */
94 >                        return(O_HIT);  /* vertex inside */
95          }
96          if (vloc)                       /* all to one side */
97 <                return(0);
97 >                return(O_MISS);
98                                          /* check edges */
99          for (i = 0; i < 4; i++)
100                  for (j = 0; j < 3; j++) {
# Line 102 | Line 102 | CUBE  *cu;
102                          VCOPY(v1, vert[vstart[i]]);
103                          VCOPY(v2, vert[vstart[i] ^ 1<<j]);
104                          if (clip(v1, v2, cumin, cumax))
105 <                                return(1);              /* edge inside */
105 >                                return(O_HIT);          /* edge inside */
106                  }
107  
108 <        return(0);                      /* no intersection */
108 >        return(O_MISS);                 /* no intersection */
109   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines