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

Comparing ray/src/rt/pmapsrc.c (file contents):
Revision 2.5 by greg, Fri May 22 11:38:26 2015 UTC vs.
Revision 2.9 by rschregle, Tue Sep 22 15:08:31 2015 UTC

# Line 1 | Line 1
1 + #ifndef lint
2 + static const char RCSid[] = "$Id$";
3 + #endif
4   /*
5     ==================================================================
6     Photon map support routines for emission from light sources
# Line 7 | Line 10
10     (c) Lucerne University of Applied Sciences and Arts,
11     supported by the Swiss National Science Foundation (SNSF, #147053)
12     ==================================================================
13 <  
11 <   $Id$
13 >
14   */
15  
16  
# Line 532 | Line 534 | void getPhotonPorts ()
534     for (i = 0; i < nobjects; i++) {
535        obj = objptr(i);
536        
537 <      if (inset(ambset, obj -> omod)) {
537 >      /* Check if object is a surface and resolve its material via any
538 >       * aliases, then check for inclusion in port modifier list */
539 >      if (issurface(obj -> otype) &&
540 >          inset(ambset, objndx(findmaterial(obj)))) {
541           /* Add photon port */
542           photonPorts = (SRCREC*)realloc(photonPorts,
543                                          (numPhotonPorts + 1) *
# Line 748 | Line 753 | void emitPhoton (const EmissionMap* emap, RAY* ray)
753     photonOrigin [emap -> src -> so -> otype] ((EmissionMap*)emap);
754     /* If we have a local glow source with a maximum radius, then
755        restrict our photon to the specified distance (otherwise no limit) */
756 <   if (mod -> otype == MAT_GLOW && emap -> src -> so -> otype != OBJ_SOURCE
756 >   if (mod -> otype == MAT_GLOW && !(emap -> src -> sflags & SDISTANT)
757                  && mod -> oargs.farg[3] > FTINY)
758        ray -> rmax = mod -> oargs.farg[3];
759     else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines