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

Comparing ray/src/cv/bsdfrep.h (file contents):
Revision 2.12 by greg, Wed Feb 19 05:16:06 2014 UTC vs.
Revision 2.18 by greg, Wed Mar 19 20:49:01 2014 UTC

# Line 7 | Line 7
7  
8   #include "bsdf.h"
9  
10 #define DEBUG           1
11
10   #ifndef GRIDRES
11   #define GRIDRES         (1<<8)          /* grid resolution per side */
12   #endif
# Line 16 | Line 14
14   #define ANG2R(r)        (int)((r)*((1<<16)/M_PI))
15   #define R2ANG(c)        (((c)+.5)*(M_PI/(1<<16)))
16  
17 < typedef struct {
18 <        float           vsum;           /* DSF sum */
19 <        unsigned int    nval;           /* number of values in sum */
20 <        unsigned short  crad;           /* radius (coded angle) */
17 > typedef union {
18 >        struct {
19 >                float           v;              /* DSF sum */
20 >                unsigned int    n;              /* number of values in sum */
21 >        }       sum;                    /* sum for averaging */
22 >        float   val[2];                 /* comparison values */
23   } GRIDVAL;                      /* grid value */
24  
25   typedef struct {
# Line 106 | Line 106 | extern MIGRATION       *mig_list;
106   extern char             *progname;
107  
108                                  /* get theta value in degrees [0,180) range */
109 < #define get_theta180(v) ((180./M_PI)*acos((v)[2]))
109 > #define get_theta180(v) ((180./M_PI)*Acos((v)[2]))
110                                  /* get phi value in degrees, [0,360) range */
111   #define get_phi360(v)   ((180./M_PI)*atan2((v)[1],(v)[0]) + 360.*((v)[1]<0))
112  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines