Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedUnsignedInt4"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public NormalizedUnsignedInt4(Vector4 vector)
 {
     this.X = PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.X);
     this.Y = PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.Y);
     this.Z = PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.Z);
     this.W = PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.W);
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedByte4"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public NormalizedByte4(Vector4 vector)
 {
     this.X = (Byte)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.X);
     this.Y = (Byte)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.Y);
     this.Z = (Byte)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.Z);
     this.W = (Byte)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.W);
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedUnsignedInt4"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 /// <param name="z">The z-component from  which to create the packed instance.</param>
 /// <param name="w">The w-component from  which to create the packed instance.</param>
 public NormalizedUnsignedInt4(Single x, Single y, Single z, Single w)
 {
     this.X = PackedVectorUtils.PackNormalizedUnsigned(PackingMask, x);
     this.Y = PackedVectorUtils.PackNormalizedUnsigned(PackingMask, y);
     this.Z = PackedVectorUtils.PackNormalizedUnsigned(PackingMask, z);
     this.W = PackedVectorUtils.PackNormalizedUnsigned(PackingMask, w);
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Short4"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public Short4(Vector4 vector)
 {
     this.X = (UInt16)PackedVectorUtils.PackSigned(PackingMask, vector.X);
     this.Y = (UInt16)PackedVectorUtils.PackSigned(PackingMask, vector.Y);
     this.Z = (UInt16)PackedVectorUtils.PackSigned(PackingMask, vector.Z);
     this.W = (UInt16)PackedVectorUtils.PackSigned(PackingMask, vector.W);
 }
Example #5
0
 /// <summary>
 /// Converts the <see cref="UnsignedInt3"/> instance to a <see cref="Vector3"/> instance.
 /// </summary>
 /// <returns>The <see cref="Vector3"/> instance which was created.</returns>
 public Vector3 ToVector3()
 {
     return(new Vector3(
                PackedVectorUtils.UnpackUnsigned(PackingMask, X),
                PackedVectorUtils.UnpackUnsigned(PackingMask, Y),
                PackedVectorUtils.UnpackUnsigned(PackingMask, Z)));
 }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Int4"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public Int4(Vector4 vector)
 {
     this.X = PackedVectorUtils.PackSigned(PackingMask, vector.X);
     this.Y = PackedVectorUtils.PackSigned(PackingMask, vector.Y);
     this.Z = PackedVectorUtils.PackSigned(PackingMask, vector.Z);
     this.W = PackedVectorUtils.PackSigned(PackingMask, vector.W);
 }
Example #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Int4"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 /// <param name="z">The z-component from  which to create the packed instance.</param>
 /// <param name="w">The w-component from  which to create the packed instance.</param>
 public Int4(Single x, Single y, Single z, Single w)
 {
     this.X = PackedVectorUtils.PackSigned(PackingMask, x);
     this.Y = PackedVectorUtils.PackSigned(PackingMask, y);
     this.Z = PackedVectorUtils.PackSigned(PackingMask, z);
     this.W = PackedVectorUtils.PackSigned(PackingMask, w);
 }
Example #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedUnsignedShort4"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 /// <param name="z">The z-component from  which to create the packed instance.</param>
 /// <param name="w">The w-component from  which to create the packed instance.</param>
 public NormalizedUnsignedShort4(Single x, Single y, Single z, Single w)
 {
     this.X = (UInt16)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, x);
     this.Y = (UInt16)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, y);
     this.Z = (UInt16)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, z);
     this.W = (UInt16)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, w);
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Byte4"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 /// <param name="z">The z-component from  which to create the packed instance.</param>
 /// <param name="w">The w-component from  which to create the packed instance.</param>
 public SByte4(Single x, Single y, Single z, Single w)
 {
     this.X = (Byte)PackedVectorUtils.PackSigned(PackingMask, x);
     this.Y = (Byte)PackedVectorUtils.PackSigned(PackingMask, y);
     this.Z = (Byte)PackedVectorUtils.PackSigned(PackingMask, z);
     this.W = (Byte)PackedVectorUtils.PackSigned(PackingMask, w);
 }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedUnsignedShort4"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public NormalizedUnsignedShort4(Vector4 vector)
 {
     this.X = (UInt16)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.X);
     this.Y = (UInt16)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.Y);
     this.Z = (UInt16)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.Z);
     this.W = (UInt16)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, vector.W);
 }
Example #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SByte4"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public SByte4(Vector4 vector)
 {
     this.X = (Byte)PackedVectorUtils.PackSigned(PackingMask, vector.X);
     this.Y = (Byte)PackedVectorUtils.PackSigned(PackingMask, vector.Y);
     this.Z = (Byte)PackedVectorUtils.PackSigned(PackingMask, vector.Z);
     this.W = (Byte)PackedVectorUtils.PackSigned(PackingMask, vector.W);
 }
Example #12
0
 /// <summary>
 /// Converts the <see cref="NormalizedUnsignedShort4"/> instance to a <see cref="Vector4"/> instance.
 /// </summary>
 /// <returns>The <see cref="Vector4"/> instance which was created.</returns>
 public Vector4 ToVector4()
 {
     return(new Vector4(
                PackedVectorUtils.UnpackNormalizedUnsigned(PackingMask, X),
                PackedVectorUtils.UnpackNormalizedUnsigned(PackingMask, Y),
                PackedVectorUtils.UnpackNormalizedUnsigned(PackingMask, Z),
                PackedVectorUtils.UnpackNormalizedUnsigned(PackingMask, W)));
 }
Example #13
0
 /// <summary>
 /// Converts the <see cref="Short2"/> instance to a <see cref="Vector2"/> instance.
 /// </summary>
 /// <returns>The <see cref="Vector2"/> instance which was created.</returns>
 public Vector2 ToVector2()
 {
     return(new Vector2(
                PackedVectorUtils.UnpackSigned(PackingMask, X),
                PackedVectorUtils.UnpackSigned(PackingMask, Y)));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedUnsignedShort1"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 public NormalizedUnsignedShort1(Single x)
 {
     this.X = (UInt16)PackedVectorUtils.PackNormalizedUnsigned(PackingMask, x);
 }
 /// <summary>
 /// Converts the <see cref="NormalizedSByte1"/> instance to a <see cref="Single"/> instance.
 /// </summary>
 /// <returns>The <see cref="Single"/> instance which was created.</returns>
 public Single ToSingle()
 {
     return(PackedVectorUtils.UnpackNormalizedSigned(PackingMask, X));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedSByte1"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 public NormalizedSByte1(Single x)
 {
     this.X = (Byte)PackedVectorUtils.PackNormalizedSigned(PackingMask, x);
 }
Example #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedShort3"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 /// <param name="z">The z-component from  which to create the packed instance.</param>
 public NormalizedShort3(Single x, Single y, Single z)
 {
     this.X = (UInt16)PackedVectorUtils.PackNormalizedSigned(PackingMask, x);
     this.Y = (UInt16)PackedVectorUtils.PackNormalizedSigned(PackingMask, y);
     this.Z = (UInt16)PackedVectorUtils.PackNormalizedSigned(PackingMask, z);
 }
Example #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnsignedInt3"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 /// <param name="z">The z-component from  which to create the packed instance.</param>
 public UnsignedInt3(Single x, Single y, Single z)
 {
     this.X = PackedVectorUtils.PackUnsigned(PackingMask, x);
     this.Y = PackedVectorUtils.PackUnsigned(PackingMask, y);
     this.Z = PackedVectorUtils.PackUnsigned(PackingMask, z);
 }
Example #19
0
 /// <summary>
 /// Converts the <see cref="Byte1"/> instance to a <see cref="Single"/> instance.
 /// </summary>
 /// <returns>The <see cref="Single"/> instance which was created.</returns>
 public Single ToSingle()
 {
     return(PackedVectorUtils.UnpackUnsigned(PackingMask, X));
 }
Example #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Short2"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public Short2(Vector2 vector)
 {
     this.X = (UInt16)PackedVectorUtils.PackSigned(PackingMask, vector.X);
     this.Y = (UInt16)PackedVectorUtils.PackSigned(PackingMask, vector.Y);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedSByte3"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 /// <param name="z">The z-component from  which to create the packed instance.</param>
 public NormalizedSByte3(Single x, Single y, Single z)
 {
     this.X = (Byte)PackedVectorUtils.PackNormalizedSigned(PackingMask, x);
     this.Y = (Byte)PackedVectorUtils.PackNormalizedSigned(PackingMask, y);
     this.Z = (Byte)PackedVectorUtils.PackNormalizedSigned(PackingMask, z);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedSByte3"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public NormalizedSByte3(Vector3 vector)
 {
     this.X = (Byte)PackedVectorUtils.PackNormalizedSigned(PackingMask, vector.X);
     this.Y = (Byte)PackedVectorUtils.PackNormalizedSigned(PackingMask, vector.Y);
     this.Z = (Byte)PackedVectorUtils.PackNormalizedSigned(PackingMask, vector.Z);
 }
Example #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Byte3"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 /// <param name="z">The z-component from  which to create the packed instance.</param>
 public Byte3(Single x, Single y, Single z)
 {
     this.X = (Byte)PackedVectorUtils.PackUnsigned(PackingMask, x);
     this.Y = (Byte)PackedVectorUtils.PackUnsigned(PackingMask, y);
     this.Z = (Byte)PackedVectorUtils.PackUnsigned(PackingMask, z);
 }
Example #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Byte3"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public Byte3(Vector3 vector)
 {
     this.X = (Byte)PackedVectorUtils.PackUnsigned(PackingMask, vector.X);
     this.Y = (Byte)PackedVectorUtils.PackUnsigned(PackingMask, vector.Y);
     this.Z = (Byte)PackedVectorUtils.PackUnsigned(PackingMask, vector.Z);
 }
Example #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Byte1"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 public Byte1(Single x)
 {
     this.X = (Byte)PackedVectorUtils.PackUnsigned(PackingMask, x);
 }
Example #26
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedInt3"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public NormalizedInt3(Vector3 vector)
 {
     this.X = PackedVectorUtils.PackNormalizedSigned(PackingMask, vector.X);
     this.Y = PackedVectorUtils.PackNormalizedSigned(PackingMask, vector.Y);
     this.Z = PackedVectorUtils.PackNormalizedSigned(PackingMask, vector.Z);
 }
Example #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnsignedInt3"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public UnsignedInt3(Vector3 vector)
 {
     this.X = PackedVectorUtils.PackUnsigned(PackingMask, vector.X);
     this.Y = PackedVectorUtils.PackUnsigned(PackingMask, vector.Y);
     this.Z = PackedVectorUtils.PackUnsigned(PackingMask, vector.Z);
 }
Example #28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedInt3"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 /// <param name="z">The z-component from  which to create the packed instance.</param>
 public NormalizedInt3(Single x, Single y, Single z)
 {
     this.X = PackedVectorUtils.PackNormalizedSigned(PackingMask, x);
     this.Y = PackedVectorUtils.PackNormalizedSigned(PackingMask, y);
     this.Z = PackedVectorUtils.PackNormalizedSigned(PackingMask, z);
 }
Example #29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Short3"/> structure from the specified vector components.
 /// </summary>
 /// <param name="x">The x-component from  which to create the packed instance.</param>
 /// <param name="y">The y-component from  which to create the packed instance.</param>
 public Short2(Single x, Single y)
 {
     this.X = (UInt16)PackedVectorUtils.PackSigned(PackingMask, x);
     this.Y = (UInt16)PackedVectorUtils.PackSigned(PackingMask, y);
 }
Example #30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NormalizedShort3"/> structure from the specified vector.
 /// </summary>
 /// <param name="vector">The vector from which to create the packed instance.</param>
 public NormalizedShort3(Vector3 vector)
 {
     this.X = (UInt16)PackedVectorUtils.PackNormalizedSigned(PackingMask, vector.X);
     this.Y = (UInt16)PackedVectorUtils.PackNormalizedSigned(PackingMask, vector.Y);
     this.Z = (UInt16)PackedVectorUtils.PackNormalizedSigned(PackingMask, vector.Z);
 }