예제 #1
0
 public ColorNamedValueSwizzle(
     IColorNamedValue <TIdentifier> source,
     ColorSwizzle swizzleType)
 {
     this.Source      = source;
     this.SwizzleType = swizzleType;
 }
예제 #2
0
        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));
        }