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

Comparing ray/src/rt/rv3.c (file contents):
Revision 2.40 by greg, Tue May 26 10:00:47 2015 UTC vs.
Revision 2.41 by greg, Wed Nov 7 18:34:58 2018 UTC

# Line 13 | Line 13 | static const char      RCSid[] = "$Id$";
13  
14   #include  "ray.h"
15   #include  "rpaint.h"
16 + #include  "otypes.h"
17 + #include  "otspecial.h"
18 + #include  "source.h"
19   #include  "random.h"
20  
21   #ifndef WFLUSH
# Line 114 | Line 117 | getinterest(           /* get area of interest */
117                  }
118                  if (!direc || ourview.type == VT_PAR) {
119                          rayorigin(&thisray, PRIMARY, NULL, NULL);
120 <                        if (!localhit(&thisray, &thescene)) {
120 >                        while (localhit(&thisray, &thescene)) {
121 >                                OBJREC  *m = findmaterial(thisray.ro);
122 >                                if (m != NULL && !istransp(m->otype) &&
123 >                                                !isBSDFproxy(m) &&
124 >                                                (thisray.clipset == NULL ||
125 >                                                        !inset(thisray.clipset,
126 >                                                            thisray.ro->omod)))
127 >                                        break;          /* found something */
128 >                                VCOPY(thisray.rorg, thisray.rop);
129 >                                rayclear(&thisray);     /* skip invisible */
130 >                        }
131 >                        if (thisray.ro == NULL) {
132                                  error(COMMAND, "not a local object");
133                                  return(-1);
134                          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines