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

Comparing ray/src/rt/source.c (file contents):
Revision 2.7 by greg, Thu Oct 22 09:55:16 1992 UTC vs.
Revision 2.10 by greg, Mon Feb 22 15:54:04 1993 UTC

# Line 81 | Line 81 | marksources()                  /* find and mark source objects */
81                  if (m->otype == MAT_GLOW) {
82                          source[ns].sflags |= SPROX;
83                          source[ns].sl.prox = m->oargs.farg[3];
84 <                        if (o->otype == OBJ_SOURCE)
84 >                        if (source[ns].sflags & SDISTANT)
85                                  source[ns].sflags |= SSKIP;
86                  } else if (m->otype == MAT_SPOT) {
87                          source[ns].sflags |= SSPOT;
# Line 383 | Line 383 | char  *p;                      /* data for f */
383   */
384  
385   #define  distglow(m, r)         (m->otype==MAT_GLOW && \
386 +                                m->oargs.farg[3] >= -FTINY && \
387                                  r->rot > m->oargs.farg[3])
388  
389   /* badcomponent *
# Line 418 | Line 419 | char  *p;                      /* data for f */
419  
420   /* srcignore *
421   *
422 < * The -di flag renders light sources invisible, and here is the test.
422 > * The -dv flag is normally on for sources to be visible.
423   */
424  
425 < #define  srcignore(m, r)        (directinvis && !(r->crtype&SHADOW) && \
425 > #define  srcignore(m, r)        (!directvis && !(r->crtype&SHADOW) && \
426                                  !distglow(m, r))
427  
428  
# Line 448 | Line 449 | register RAY  *r;
449          if (srcignore(m, r))
450                  return;
451                                                  /* check for outside spot */
452 <        if (m->otype==MAT_SPOT && spotout(r, (SPOT *)m->os, r->rot>=FHUGE))
452 >        if (m->otype==MAT_SPOT && spotout(r, makespot(m), r->rot>=FHUGE))
453                  return;
454                                                  /* get distribution pattern */
455          raytexture(r, m->omod);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines