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.16 by greg, Fri May 9 22:18:03 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 */
45 <        void    (*hitf)();      /* custom hit test for this traversal */
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 49 | Line 50 | typedef struct ray {
50          FVECT   ron;            /* intersection surface normal */
51          double  rod;            /* -DOT(rdir, ron) */
52          FULLXF  *rox;           /* object transformation */
53 <        FLOAT   uv[2];          /* local coordinates */
53 >        RREAL   uv[2];          /* local coordinates */
54          FVECT   pert;           /* surface normal perturbation */
55          COLOR   pcol;           /* pattern color */
56          COLOR   rcol;           /* returned ray value */
# Line 155 | 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  
158 #ifdef NOPROTO
159
160 extern void     headclean();
161 extern void     openheader();
162 extern void     dupheader();
163 extern void     pfdetach();
164 extern void     pfclean();
165 extern void     pflock();
166 extern void     pfhold();
167 extern void     io_process();
168 extern int      free_objs();
169 extern void     free_objmem();
170 extern int      load_os();
171 extern void     preload_objs();
172 extern void     ray_init();
173 extern void     ray_trace();
174 extern void     ray_done();
175 extern void     ray_save();
176 extern void     ray_restore();
177 extern void     ray_defaults();
178 extern void     ray_pinit();
179 extern void     ray_psend();
180 extern int      ray_pqueue();
181 extern int      ray_presult();
182 extern void     ray_pdone();
183 extern void     ray_popen();
184 extern void     ray_pclose();
185 extern int      rayorigin();
186 extern void     rayclear();
187 extern void     raytrace();
188 extern void     rayhit();
189 extern void     raycont();
190 extern void     raytrans();
191 extern int      rayshade();
192 extern void     rayparticipate();
193 extern void     raytexture();
194 extern int      raymixture();
195 extern double   raydist();
196 extern double   raynormal();
197 extern void     newrayxf();
198 extern void     flipsurface();
199 extern int      localhit();
200 extern int      getrenderopt();
201 extern void     print_rdefaults();
202 extern void     drawsources();
203 extern void     rtrace();
204 extern void     rview();
205 extern void     rpict();
206
207 #else
159                                          /* defined in duphead.c */
160   extern void     headclean(void);
161   extern void     openheader(void);
# Line 262 | 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