2014/utils/Atil/Inc/RgbColor.inl
/// <summary>
/// This inlined method is defined in RgbColor.h. <see cref="RgbColor">
/// </summary>
///


This inlined method is defined in RgbColor.h.
This inlined method is defined in RgbColor . h .
inline half RgbColor16f::asGray (DataModelAttributes::ChannelOrder format) const
{
    half gray;
    const Channels* channels = (const Channels*) &packed;
    if (format == DataModelAttributes::kRedGreenBlueAlpha) {
        gray = static_cast<half> ((float) (channels->blue * RgbColorFactors::kLuminanceRedFactor
            + channels->green * RgbColorFactors::kLuminanceGreenFactor
            + channels->red * RgbColorFactors::kLuminanceBlueFactor + half(0.5)));
    }
    else {
        gray = static_cast<half> ((float) (channels->red * RgbColorFactors::kLuminanceRedFactor
            + channels->green * RgbColorFactors::kLuminanceGreenFactor
            + channels->blue  * RgbColorFactors::kLuminanceBlueFactor + half(0.5)));
    }
    return gray;
}
inline half RgbColor16f :: asGray ( DataModelAttributes :: ChannelOrder format ) const { half gray ; const Channels * channels = ( const Channels * ) & packed ; if ( format == DataModelAttributes :: kRedGreenBlueAlpha ) { gray = static_cast < half > ( ( float ) ( channels -> blue * RgbColorFactors :: kLuminanceRedFactor + channels -> green * RgbColorFactors :: kLuminanceGreenFactor + channels -> red * RgbColorFactors :: kLuminanceBlueFactor + half ( 0.5 ) ) ) ; } else { gray = static_cast < half > ( ( float ) ( channels -> red * RgbColorFactors :: kLuminanceRedFactor + channels -> green * RgbColorFactors :: kLuminanceGreenFactor + channels -> blue * RgbColorFactors :: kLuminanceBlueFactor + half ( 0.5 ) ) ) ; } return gray ; }
<summary>
This inlined method is defined in RgbColor.h.
<summary > This inlined method is defined in RgbColor . h .