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

Comparing ray/src/rt/source.h (file contents):
Revision 1.1 by greg, Thu Feb 2 10:41:15 1989 UTC vs.
Revision 1.7 by greg, Thu Jun 20 09:03:21 1991 UTC

# Line 8 | Line 8
8   *     8/20/85
9   */
10  
11 + #define  AIMREQT        100             /* required aim success/failure */
12 +
13   #define  SDISTANT       01              /* source distant flag */
14   #define  SSKIP          02              /* source skip flag */
15   #define  SPROX          04              /* source proximity flag */
16   #define  SSPOT          010             /* source spotlight flag */
17 + #define  SVIRTUAL       020             /* source virtual flag */
18 + #define  SFLAT          040             /* source flat flag */
19 + #define  SFOLLOW        0100            /* source follow path flag */
20  
21   typedef struct {
22 <        float  siz;             /* output solid angle */
22 >        FVECT  aim;             /* aim direction or center */
23 >        float  siz;             /* output solid angle or area */
24          float  flen;            /* focal length */
19        FVECT  aim;             /* aim direction */
25   } SPOT;                 /* spotlight */
26  
27   typedef struct {
28 <        short  sflags;          /* source flags */
28 >        int  sflags;            /* source flags */
29          FVECT  sloc;            /* direction or position of source */
30 +        FVECT  snorm;           /* surface normal of flat source */
31          float  ss;              /* tangent or disk radius */
32          float  ss2;             /* domega or projected area */
33 <        union {
33 >        struct {
34                  float  prox;            /* proximity */
35                  SPOT  *s;               /* spot */
36          } sl;                   /* localized source information */
37 <        OBJREC  *so;            /* source object */
38 < }  SOURCE;              /* light source */
37 >        union {
38 >                int  success;           /* successes - AIMREQT*failures */
39 >                int  svnext;            /* next source to aim for */
40 >        } sa;                   /* source aiming information */
41 >        long  ntests, nhits;    /* shadow tests and hits */
42 >        OBJREC  *so;            /* source destination object */
43 > }  SRCREC;              /* light source */
44  
45 < #define  MAXSOURCE      512             /* maximum # of sources */
45 > typedef struct {
46 >        FVECT  dir;             /* source direction */
47 >        COLOR  coef;            /* material coefficient */
48 >        COLOR  val;             /* contribution */
49 > }  CONTRIB;             /* direct contribution */
50  
51 < extern SOURCE  srcval[MAXSOURCE];       /* our source list */
51 > typedef struct {
52 >        int  sno;               /* source number */
53 >        float  brt;             /* brightness (for comparison) */
54 > }  CNTPTR;              /* contribution pointer */
55 >
56 > extern SRCREC  *source;                 /* our source list */
57   extern int  nsources;                   /* the number of sources */
58  
59 < extern double  srcray();                /* ray to source */
59 > extern double  srcray();                /* ray to source */
60  
61   extern SPOT  *makespot();               /* make spotlight */
62 +
63 + extern SRCREC  *newsource();            /* allocate new source */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines