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.8 by greg, Sat Jan 23 18:58:35 2016 UTC vs.
Revision 3.9 by greg, Wed Nov 15 18:02:52 2023 UTC

# Line 45 | Line 45 | typedef unsigned short C_CHROMA;       /* encoded (x,y) chro
45                          C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV,C_CMAXV},\
46                          (long)C_CNSS*C_CMAXV, 1./3., 1./3., 178.006 }
47  
48 < #define c_cval(c,l)     ((c)->ssamp[((l)+(C_CWLI/2.-C_MINWL))/C_CWLI] \
48 > #define c_cval(c,l)     ((c)->ssamp[((l)+(.5*C_CWLI-C_MINWL))/C_CWLI] \
49                                                  / (double)(c)->ssum)
50  
51   extern const C_COLOR    c_dfcolor;              /* default color */
# Line 78 | Line 78 | extern C_CHROMA        c_encodeChroma(C_COLOR *clr);
78                                                  /* decode (x,y) chromaticity */
79   extern void     c_decodeChroma(C_COLOR *cres, C_CHROMA ccode);
80  
81 < /* The following two routines are not defined in ccolor.c */
81 > #ifdef _RAD_COLOR_H_
82 > /* The following four routines are defined in ccyrgb.c */
83                                                  /* convert to RGB color */
84 < extern void     ccy2rgb(C_COLOR *cin, double cieY, float cout[3]);
84 > extern void     ccy2rgb(C_COLOR *cin, double cieY, COLOR cout);
85                                                  /* convert from RGB color */
86 < extern double   rgb2ccy(float cin[3], C_COLOR *cout);
86 > extern double   rgb2ccy(COLOR cin, C_COLOR *cout);
87 >                                                /* convert to spectral color */
88 > extern void     ccy2scolor(C_COLOR *cin, double cieY, SCOLOR sco);
89 >                                                /* convert from spectral color */
90 > extern double   scolor2ccy(SCOLOR sci, C_COLOR *cout);
91 >
92 > #endif /* _RAD_COLOR_H_ */
93  
94   #ifdef __cplusplus
95   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines