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

Comparing ray/src/rt/ray.h (file contents):
Revision 2.18 by schorsch, Thu Jun 26 00:58:10 2003 UTC vs.
Revision 2.26 by greg, Thu May 26 06:55:22 2005 UTC

# Line 4 | Line 4
4   */
5   #ifndef _RAD_RAY_H_
6   #define _RAD_RAY_H_
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
7  
11
12 #include "copyright.h"
13
8   #include  "standard.h"
15
9   #include  "octree.h"
17
10   #include  "object.h"
19
11   #include  "color.h"
12  
13 + #ifdef __cplusplus
14 + extern "C" {
15 + #endif
16 +
17   #define  MAXDIM         32      /* maximum number of dimensions */
18  
19                                  /* ray type flags */
# Line 36 | Line 31 | extern "C" {
31   typedef struct ray {
32          unsigned long  rno;     /* unique ray number */
33          int     rlvl;           /* number of reflections for this ray */
34 <        float   rweight;        /* cumulative weight of this ray */
34 >        float   rweight;        /* cumulative weight (for termination) */
35 >        COLOR   rcoef;          /* contribution coefficient w.r.t. parent */
36          short   rtype;          /* ray type */
37          short   crtype;         /* cumulative ray type */
38 <        struct ray  *parent;    /* ray this originated from */
38 >        const struct ray  *parent;      /* ray this originated from */
39          FVECT   rorg;           /* origin of ray */
40          FVECT   rdir;           /* normalized direction of ray */
41          double  rmax;           /* maximum distance (aft clipping plane) */
42          int     rsrc;           /* source we're aiming for */
43          OBJECT  *clipset;       /* set of objects currently clipped */
44          OBJECT  *newcset;       /* next clipset, used for transmission */
45 <        void    (*revf)();      /* evaluation function for this ray */
46 <        void    (*hitf)();      /* custom hit test for this traversal */
45 >        void    (*revf)(struct ray *);  /* ray evaluation function */
46 >        void    (*hitf)(OBJECT *, struct ray *);        /* custom hit test */
47          OBJECT  robj;           /* intersected object number */
48          OBJREC  *ro;            /* intersected object (one with material) */
49          double  rot;            /* distance to object */
# Line 58 | Line 54 | typedef struct ray {
54          RREAL   uv[2];          /* local coordinates */
55          FVECT   pert;           /* surface normal perturbation */
56          COLOR   pcol;           /* pattern color */
57 <        COLOR   rcol;           /* returned ray value */
57 >        COLOR   rcol;           /* returned radiance value */
58          double  rt;             /* returned effective ray length */
59          COLOR   cext;           /* medium extinction coefficient */
60          COLOR   albedo;         /* medium scattering albedo */
# Line 124 | Line 120 | extern int     ambincl;        /* include == 1, exclude == 0 */
120   extern int      ray_pnprocs;    /* number of child processes */
121   extern int      ray_pnidle;     /* number of idle processes */
122  
123 < #define AMBLLEN         128     /* max. ambient list length */
124 < #define AMBWORD         8       /* average word length */
123 > #ifndef AMBLLEN
124 > #define AMBLLEN         512     /* max. ambient list length */
125 > #endif
126 > #define AMBWORD         12      /* average word length */
127  
128   typedef struct {                /* rendering parameter holder */
129          int     do_irrad;
# Line 165 | Line 163 | typedef struct {               /* rendering parameter holder */
163   extern void     headclean(void);
164   extern void     openheader(void);
165   extern void     dupheader(void);
166 +                                        /* defined in persist.c */
167 + extern void persistfile(char *pfn);
168   extern void     pfdetach(void);
169   extern void     pfclean(void);
170   extern void     pflock(int lf);
# Line 192 | Line 192 | extern void    ray_pdone(int freall);
192   extern void     ray_popen(int nadd);
193   extern void     ray_pclose(int nsub);
194                                          /* defined in raytrace.c */
195 < extern int      rayorigin(RAY *r, RAY *ro, int rt, double rw);
195 > extern int      rayorigin(RAY *r, int rt, const RAY *ro, const COLOR rc);
196   extern void     rayclear(RAY *r);
197   extern void     raytrace(RAY *r);
198   extern void     rayhit(OBJECT *oset, RAY *r);
# Line 202 | Line 202 | extern int     rayshade(RAY *r, int mod);
202   extern void     rayparticipate(RAY *r);
203   extern void     raytexture(RAY *r, OBJECT mod);
204   extern int      raymixture(RAY *r, OBJECT fore, OBJECT back, double coef);
205 < extern double   raydist(RAY *r, int flags);
205 > extern void     raycontrib(COLOR rc, const RAY *r, int flags);
206 > extern double   raydist(const RAY *r, int flags);
207   extern double   raynormal(FVECT norm, RAY *r);
208   extern void     newrayxf(RAY *r);
209   extern void     flipsurface(RAY *r);
# Line 213 | Line 214 | extern void    print_rdefaults(void);
214                                          /* defined in srcdraw.c */
215   extern void     drawsources(COLOR *pic[], float *zbf[],
216                          int x0, int xsiz, int y0, int ysiz);
217 + extern void init_drawsources(int rad);
218 +                                        /* defined in rt/initotypes.c */
219 + extern void initotypes(void);
220                                          /* module main procedures */
221   extern void     rtrace(char *fname);
222 + extern char * formstr(int  f);
223   extern void     rview(void);
224   extern void     rpict(int seq, char *pout, char *zout, char *prvr);
225  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines