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 1.2 by greg, Tue Apr 11 13:16:43 1989 UTC vs.
Revision 2.4 by greg, Tue Dec 20 20:18:20 1994 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
1 > /* Copyright (c) 1994 Regents of the University of California */
2  
3   /* SCCSid "$SunId$ LBL" */
4  
# Line 21 | Line 21
21   #define  REFRACTED      010             /* refracted (bent) ray */
22   #define  TRANS          020             /* transmitted/transferred ray */
23   #define  AMBIENT        040             /* ray scattered for interreflection */
24 + #define  SPECULAR       0100            /* ray scattered for specular */
25  
26                                  /* reflected ray types */
27 < #define  RAYREFL        (SHADOW|REFLECTED|AMBIENT)
27 > #define  RAYREFL        (SHADOW|REFLECTED|AMBIENT|SPECULAR)
28  
29   typedef struct ray {
30 <        long  rno;              /* unique ray number */
30 >        unsigned long  rno;     /* unique ray number */
31          int  rlvl;              /* number of reflections for this ray */
32          float  rweight;         /* cumulative weight of this ray */
33          short  rtype;           /* ray type */
# Line 34 | Line 35 | typedef struct ray {
35          struct ray  *parent;    /* ray this originated from */
36          FVECT  rorg;            /* origin of ray */
37          FVECT  rdir;            /* normalized direction of ray */
38 +        double  rmax;           /* maximum distance (aft clipping plane) */
39          int  rsrc;              /* source we're aiming for */
40          OBJECT  *clipset;       /* set of objects currently clipped */
41          OBJECT  *newcset;       /* next clipset, used for transmission */
42 +        int  (*revf)();         /* evaluation function for this ray */
43          OBJREC  *ro;            /* intersected object */
44          double  rot;            /* distance to object */
45          FVECT  rop;             /* intersection point */
46          FVECT  ron;             /* intersection surface normal */
47          double  rod;            /* -DOT(rdir, ron) */
48 <        double  rofx[4][4];     /* transform from object space */
46 <        double  rofs;           /* scaling factor from object */
47 <        double  robx[4][4];     /* transform back to object space */
48 <        double  robs;           /* back scaling factor */
48 >        FULLXF  *rox;           /* object transformation */
49          FVECT  pert;            /* surface normal perturbation */
50          COLOR  pcol;            /* pattern color */
51          COLOR  rcol;            /* returned ray value */
52 +        double  rt;             /* returned effective ray length */
53   }  RAY;
54  
55 + extern int  raytrace();
56 +
57   extern double  raynormal();
58 +
59 + extern int  dimlist[];          /* dimension list for distribution */
60 + extern int  ndims;              /* number of dimensions so far */
61 + extern int  samplendx;          /* index for this sample */
62 +
63 + #define  MAXDIM         32      /* maximum number of dimensions */
64 +
65 + #define  rayvalue(r)    (*(r)->revf)(r)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines