Ejemplo n.º 1
0
 public static RgbSpectrum Transform(RgbSpectrum c)
 {
     float[] xyz = new float[3];
     c.XYZ(ref xyz);
     var r = ((rWeight[0] * xyz[0] +
                       rWeight[1] * xyz[1] +
                       rWeight[2] * xyz[2]));
     var g = ((gWeight[0] * xyz[0] +
                       gWeight[1] * xyz[1] +
                       gWeight[2] * xyz[2]));
     var b = ((bWeight[0] * xyz[0] +
                       bWeight[1] * xyz[1] +
                       bWeight[2] * xyz[2]));
     return new RgbSpectrum(r, g, b);
 }