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.13 by greg, Tue Feb 25 02:47:23 2003 UTC vs.
Revision 2.21 by greg, Thu Aug 28 03:22:16 2003 UTC

# Line 2 | Line 2
2   /*
3   *  ray.h - header file for routines using rays.
4   */
5 + #ifndef _RAD_RAY_H_
6 + #define _RAD_RAY_H_
7  
6 #include "copyright.h"
7
8   #include  "standard.h"
9
9   #include  "octree.h"
11
10   #include  "object.h"
13
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 40 | Line 41 | typedef struct ray {
41          int     rsrc;           /* source we're aiming for */
42          OBJECT  *clipset;       /* set of objects currently clipped */
43          OBJECT  *newcset;       /* next clipset, used for transmission */
44 <        void    (*revf)();      /* evaluation function for this ray */
44 >        void    (*revf)(struct ray *);  /* evaluation function for this ray */
45 >        void    (*hitf)(OBJECT *, struct ray *);        /* custom hit test */
46          OBJECT  robj;           /* intersected object number */
47          OBJREC  *ro;            /* intersected object (one with material) */
48          double  rot;            /* distance to object */
# Line 48 | Line 50 | typedef struct ray {
50          FVECT   ron;            /* intersection surface normal */
51          double  rod;            /* -DOT(rdir, ron) */
52          FULLXF  *rox;           /* object transformation */
53 +        RREAL   uv[2];          /* local coordinates */
54          FVECT   pert;           /* surface normal perturbation */
55          COLOR   pcol;           /* pattern color */
56          COLOR   rcol;           /* returned ray value */
# Line 153 | Line 156 | typedef struct {               /* rendering parameter holder */
156   #define rpambmod(p,i)   ( (i)>=AMBLLEN||(p)->amblndx[i]<0 ? \
157                            (char *)NULL : (p)->amblval+(p)->amblndx[i] )
158  
156 #ifdef NOPROTO
157
158 extern void     headclean();
159 extern void     openheader();
160 extern void     dupheader();
161 extern void     pfdetach();
162 extern void     pfclean();
163 extern void     pflock();
164 extern void     pfhold();
165 extern void     io_process();
166 extern int      free_objs();
167 extern void     free_objmem();
168 extern int      load_os();
169 extern void     preload_objs();
170 extern void     ray_init();
171 extern void     ray_trace();
172 extern void     ray_done();
173 extern void     ray_save();
174 extern void     ray_restore();
175 extern void     ray_defaults();
176 extern void     ray_pinit();
177 extern void     ray_psend();
178 extern int      ray_pqueue();
179 extern int      ray_presult();
180 extern void     ray_pdone();
181 extern void     ray_popen();
182 extern void     ray_pclose();
183 extern int      rayorigin();
184 extern void     rayclear();
185 extern void     raytrace();
186 extern void     raycont();
187 extern void     raytrans();
188 extern int      rayshade();
189 extern void     rayparticipate();
190 extern int      raymixture();
191 extern double   raydist();
192 extern double   raynormal();
193 extern void     newrayxf();
194 extern void     flipsurface();
195 extern int      localhit();
196 extern int      getrenderopt();
197 extern void     print_rdefaults();
198 extern void     drawsources();
199 extern void     rtrace();
200 extern void     rview();
201 extern void     rpict();
202
203 #else
159                                          /* defined in duphead.c */
160   extern void     headclean(void);
161   extern void     openheader(void);
# Line 235 | Line 190 | extern void    ray_pclose(int nsub);
190   extern int      rayorigin(RAY *r, RAY *ro, int rt, double rw);
191   extern void     rayclear(RAY *r);
192   extern void     raytrace(RAY *r);
193 + extern void     rayhit(OBJECT *oset, RAY *r);
194   extern void     raycont(RAY *r);
195   extern void     raytrans(RAY *r);
196   extern int      rayshade(RAY *r, int mod);
197   extern void     rayparticipate(RAY *r);
198 + extern void     raytexture(RAY *r, OBJECT mod);
199   extern int      raymixture(RAY *r, OBJECT fore, OBJECT back, double coef);
200   extern double   raydist(RAY *r, int flags);
201   extern double   raynormal(FVECT norm, RAY *r);
# Line 256 | Line 213 | extern void    rtrace(char *fname);
213   extern void     rview(void);
214   extern void     rpict(int seq, char *pout, char *zout, char *prvr);
215  
216 +
217 + #ifdef __cplusplus
218 + }
219   #endif
220 + #endif /* _RAD_RAY_H_ */
221 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines