public static ushort ConvertToUshort(uint color) { RGBA8888 ucolor = new RGBA8888() { color = color }; return(ConvertToUshort(ucolor.r, ucolor.g, ucolor.b)); }
public static void ConvertToVec4(uint color, ref vec4 output) { var rgba8888 = new RGBA8888() { color = color }; ConvertToVec4(rgba8888.r, rgba8888.g, rgba8888.b, rgba8888.a, ref output); }
public static RGB565 ConvertToRGB565(uint color) { RGBA8888 ucolor = new RGBA8888() { color = color }; return(ConvertToRGB565(ucolor.r, ucolor.g, ucolor.b)); }
public override string ToString() { RGBA8888 rgba = new RGBA8888() { color = (PixelFormatConverter.ConvertToUint(this)) }; return(string.Format("r={0} g={1} b={2} value=0x{3:X}", rgba.r, rgba.g, rgba.b, color)); }
public static float ConvertToFloat(byte[] data, int offsetIndex) { var point = new RGBA8888() { r = data[offsetIndex + P_BYTE_OFFSET_RED], g = data[offsetIndex + P_BYTE_OFFSET_GREEN], b = data[offsetIndex + P_BYTE_OFFSET_BLUE], a = data[offsetIndex + P_BYTE_OFFSET_ALPHA], }; return(point.depth); }
public static uint ConvertToUint(RGBA8888 input) { return(ConvertToUint(input.r, input.g, input.b, input.a)); }
public static ushort ConvertToUshort(RGBA8888 color) { return(ConvertToUshort(color.r, color.g, color.b)); }
public static void ConvertToVec4(RGBA8888 color, ref vec4 output) { ConvertToVec4(color.r, color.g, color.b, color.a, ref output); }
public static RGB565 ConvertToRGB565(RGBA8888 color) { return(ConvertToRGB565(color.r, color.g, color.b)); }
public static void ConvertToBytes(RGBA8888 color, byte[] outputData, int offsetIndex) { ConvertToBytes(color.r, color.g, color.b, color.a, outputData, offsetIndex); }