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

Comparing ray/src/common/ccolor.h (file contents):
Revision 3.1 by greg, Fri Feb 18 00:40:25 2011 UTC vs.
Revision 3.4 by greg, Thu May 17 21:16:02 2012 UTC

# Line 43 | Line 43 | typedef struct {
43                          C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV},\
44                          (long)C_CNSS*C_CMAXV, 1./3., 1./3., 178.006 }
45  
46 < #define c_cval(c,l)     ((double)(c)->ssamp[((l)-C_MINWL)/C_CWLI] / (c)->ssum)
46 > #define c_cval(c,l)     ((c)->ssamp[((l)+(C_CWLI/2.-C_MINWL))/C_CWLI] \
47 >                                                / (double)(c)->ssum)
48  
49   extern C_COLOR          c_dfcolor;              /* default color */
50  
51 < extern void     c_ccvt(C_COLOR *, int);         /* fix color representation */
52 < extern int      c_isgrey(C_COLOR *);            /* check if color is grey */
51 >                                                /* set CIE (x,y) chromaticity */
52 > #define c_cset(c,x,y)   ((c)->cx=(x),(c)->cy=(y),(c)->flags=C_CDXY|C_CSXY)
53 >
54 >                                                /* set black body spectrum */
55 > extern int      c_bbtemp(C_COLOR *clr, double tk);
56 >                                                /* assign arbitrary spectrum */
57 > extern double   c_sset(C_COLOR *clr, double wlmin, double wlmax,
58 >                                const float spec[], int nwl);
59 > extern void     c_ccvt(C_COLOR *clr, int fl);   /* fix color representation */
60 > extern int      c_isgrey(C_COLOR *clr);         /* check if color is grey */
61                                                  /* mix two colors */
62   extern void     c_cmix(C_COLOR *cres, double w1, C_COLOR *c1,
63                                  double w2, C_COLOR *c2);
64 <                                                /* set black body spectrum */
65 < extern int      c_bbtemp(C_COLOR *clr, double tk);
64 >                                                /* multiply two colors */
65 > extern double   c_cmult(C_COLOR *cres, C_COLOR *c1, double y1,
66 >                                C_COLOR *c2, double y2);
67                                                  /* convert to RGB color */
68   extern void     ccy2rgb(C_COLOR *cin, double cieY, float cout[3]);
69                                                  /* convert from RGB color */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines