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 2.11 by schorsch, Mon Jul 14 22:24:00 2003 UTC vs.
Revision 2.12 by greg, Wed Dec 31 01:50:02 2003 UTC

# Line 13 | Line 13
13   extern "C" {
14   #endif
15  
16 + #ifndef  AIMREQT
17   #define  AIMREQT        100             /* required aim success/failure */
18 + #endif
19 + #ifndef  SHADCACHE
20 + #define  SHADCACHE      20              /* shadow cache resolution */
21 + #endif
22  
23   #define  SDISTANT       01              /* source distant flag */
24   #define  SSKIP          02              /* source skip flag */
# Line 31 | Line 36 | typedef struct {
36   } SPOT;                 /* spotlight */
37  
38   typedef struct {
39 +        union {
40 +                struct {
41 +                        FVECT   u, v;           /* unit vectors */
42 +                }  f;                   /* flat source indexing */
43 +                struct {
44 +                        FVECT   o;              /* origin position */
45 +                        RREAL   e1, e2;         /* 1/extent */
46 +                        int     ax;             /* major direction */
47 +                }  d;                   /* distant source indexing */
48 +        }  p;                   /* indexing parameters */
49 +        OBJECT  obs[1];         /* cache obstructors (extends struct) */
50 + }  OBSCACHE;            /* obstructor cache */
51 +
52 + typedef struct {
53          int  sflags;            /* source flags */
54          FVECT  sloc;            /* direction or position of source */
55          FVECT  ss[3];           /* source dimension vectors, U, V, and W */
56          float  srad;            /* maximum source radius */
57          float  ss2;             /* solid angle or projected area */
58 +        OBJREC  *so;            /* source destination object */
59          struct {
60                  float  prox;            /* proximity */
61                  SPOT  *s;               /* spot */
# Line 49 | Line 69 | typedef struct {
69          } sa;                   /* source aiming information */
70          unsigned long
71                  ntests, nhits;  /* shadow tests and hits */
72 <        OBJREC  *so;            /* source destination object */
72 > #ifdef  SHADCACHE
73 >        OBSCACHE  *obscache;    /* obstructor cache */
74 > #endif
75   }  SRCREC;              /* light source */
76  
77   #define MAXSPART        64              /* maximum partitions per source */
# Line 120 | Line 142 | extern int  nsources;                  /* the number of sources */
142   #define  setsource(s,o)         (*sfun[(o)->otype].of->setsrc)(s,o)
143  
144                                          /* defined in source.c */
145 + extern OBJREC   *findmaterial(OBJREC *o);
146   extern void     marksources(void);
147   extern void     freesources(void);
148   extern int      srcray(RAY *sr, RAY *r, SRCINDEX *si);
# Line 128 | Line 151 | extern int     sourcehit(RAY *r);
151   extern void     direct(RAY *r, void (*f)(), char *p);
152   extern void     srcscatter(RAY *r);
153   extern int      m_light(OBJREC *m, RAY *r);
154 + extern void     srcblocker(RAY *r);
155 + extern int      srcblocked(RAY *r);
156 + extern void     freeobscache(SRCREC *s);
157                                          /* defined in srcsamp.c */
158   extern double   nextssamp(RAY *r, SRCINDEX *si);
159   extern int      skipparts(int ct[3], int sz[3], int pp[2], unsigned char *pt);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines