namespace GenericImage.PackedVectors { using System.Numerics; /// /// An interface that converts packed vector types to and from values, /// allowing multiple encodings to be manipulated in a generic way. /// /// /// The type of object representing the packed value. /// public interface IPackedVector : IPackedVector where TPacked : struct { /// /// Gets or sets the packed representation of the value. /// TPacked PackedValue { get; set; } } /// /// An interface that converts packed vector types to and from values. /// public interface IPackedVector { /// /// Sets the packed representation from a . /// /// The vector to pack. void PackVector(Vector4 vector); /// /// Sets the packed representation from a . /// /// The x-component. /// The y-component. /// The z-component. /// The w-component. void PackBytes(byte x, byte y, byte z, byte w); /// /// Expands the packed representation into a . /// /// The . Vector4 ToVector4(); /// /// Expands the packed representation into a . /// /// The . byte[] ToBytes(); } }