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.3 by greg, Thu May 17 17:10:23 2012 UTC vs.
Revision 3.6 by greg, Tue Jun 26 17:59:16 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 */
49 > extern const C_COLOR    c_dfcolor;              /* default color */
50  
51 + extern const C_COLOR    c_x31, c_y31, c_z31;    /* 1931 standard observer */
52 +
53 +                                                /* set CIE (x,y) chromaticity */
54 + #define c_cset(c,x,y)   ((c)->cx=(x),(c)->cy=(y),(c)->flags=C_CDXY|C_CSXY)
55 +
56 +                                                /* set black body spectrum */
57 + extern int      c_bbtemp(C_COLOR *clr, double tk);
58                                                  /* assign arbitrary spectrum */
59   extern double   c_sset(C_COLOR *clr, double wlmin, double wlmax,
60                                  const float spec[], int nwl);
# Line 58 | Line 66 | extern void    c_cmix(C_COLOR *cres, double w1, C_COLOR *
66                                                  /* multiply two colors */
67   extern double   c_cmult(C_COLOR *cres, C_COLOR *c1, double y1,
68                                  C_COLOR *c2, double y2);
69 <                                                /* set black body spectrum */
70 < extern int      c_bbtemp(C_COLOR *clr, double tk);
69 >                                                /* convert to sharpened RGB */
70 > extern void     c_toSharpRGB(C_COLOR *cin, double cieY, float cout[3]);
71 >                                                /* convert from sharpened RGB */
72 > extern double   c_fromSharpRGB(float cin[3], C_COLOR *cout);
73 >
74 > /* The following two routines are not defined in ccolor.c */
75                                                  /* convert to RGB color */
76   extern void     ccy2rgb(C_COLOR *cin, double cieY, float cout[3]);
77                                                  /* convert from RGB color */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines