public ColorNamedValueSwizzle( IColorNamedValue <TIdentifier> source, ColorSwizzle swizzleType) { this.Source = source; this.SwizzleType = swizzleType; }
public static Vector4 PackedVector(this ColorSwizzle swizzle) { var x = ((int)swizzle >> 12) & 15; var y = ((int)swizzle >> 8) & 15; var z = ((int)swizzle >> 4) & 15; var w = ((int)swizzle) & 15; return(new Vector4(x, y, z, w)); }