diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool3.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool3.cs index 1dfeb51b..c52d99d2 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool3.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool3.cs @@ -46,6 +46,30 @@ namespace ComputeSharp this.z = z; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + public Bool3(Bool2 xy, bool z) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second and thirt vector components. + public Bool3(bool x, Bool2 yz) + { + this.x = x; + this.y = yz.X; + this.z = yz.Y; + } + /// /// Creates a new value with the same value for all its components. /// diff --git a/src/ComputeSharp.Core/Primitives/Bool/Bool4.cs b/src/ComputeSharp.Core/Primitives/Bool/Bool4.cs index 4c315e3d..305cc760 100644 --- a/src/ComputeSharp.Core/Primitives/Bool/Bool4.cs +++ b/src/ComputeSharp.Core/Primitives/Bool/Bool4.cs @@ -53,6 +53,73 @@ namespace ComputeSharp this.w = w; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + /// The value to assign to the fourth vector component. + public Bool4(Bool2 xy, bool z, bool w) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second vector component. + /// The value to assign to the third and fourth vector components. + public Bool4(bool x, bool y, Bool2 zw) + { + this.x = x; + this.y = y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third and fourth vector components. + public Bool4(Bool2 xy, Bool2 zw) + { + this.x = xy.X; + this.y = xy.Y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first, second and third vector components. + /// The value to assign to the fourth vector component. + public Bool4(Bool3 xyz, bool w) + { + this.x = xyz.X; + this.y = xyz.Y; + this.z = xyz.Z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second, third and fourth vector components. + public Bool4(bool x, Bool3 yzw) + { + this.x = x; + this.y = yzw.X; + this.z = yzw.Y; + this.w = yzw.Z; + } + /// /// Creates a new value with the same value for all its components. /// diff --git a/src/ComputeSharp.Core/Primitives/Double/Double3.cs b/src/ComputeSharp.Core/Primitives/Double/Double3.cs index 3240fdbb..22ac229f 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double3.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double3.cs @@ -47,6 +47,30 @@ namespace ComputeSharp this.z = z; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + public Double3(Double2 xy, double z) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second and thirt vector components. + public Double3(double x, Double2 yz) + { + this.x = x; + this.y = yz.X; + this.z = yz.Y; + } + /// /// Creates a new value with the same value for all its components. /// diff --git a/src/ComputeSharp.Core/Primitives/Double/Double4.cs b/src/ComputeSharp.Core/Primitives/Double/Double4.cs index 339b7033..76fc888c 100644 --- a/src/ComputeSharp.Core/Primitives/Double/Double4.cs +++ b/src/ComputeSharp.Core/Primitives/Double/Double4.cs @@ -54,6 +54,73 @@ namespace ComputeSharp this.w = w; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + /// The value to assign to the fourth vector component. + public Double4(Double2 xy, double z, double w) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second vector component. + /// The value to assign to the third and fourth vector components. + public Double4(double x, double y, Double2 zw) + { + this.x = x; + this.y = y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third and fourth vector components. + public Double4(Double2 xy, Double2 zw) + { + this.x = xy.X; + this.y = xy.Y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first, second and third vector components. + /// The value to assign to the fourth vector component. + public Double4(Double3 xyz, double w) + { + this.x = xyz.X; + this.y = xyz.Y; + this.z = xyz.Z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second, third and fourth vector components. + public Double4(double x, Double3 yzw) + { + this.x = x; + this.y = yzw.X; + this.z = yzw.Y; + this.w = yzw.Z; + } + /// /// Creates a new value with the same value for all its components. /// diff --git a/src/ComputeSharp.Core/Primitives/Float/Float3.cs b/src/ComputeSharp.Core/Primitives/Float/Float3.cs index 5de3117b..81497f02 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float3.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float3.cs @@ -48,6 +48,30 @@ namespace ComputeSharp this.z = z; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + public Float3(Float2 xy, float z) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second and thirt vector components. + public Float3(float x, Float2 yz) + { + this.x = x; + this.y = yz.X; + this.z = yz.Y; + } + /// /// Creates a new value with the same value for all its components. /// diff --git a/src/ComputeSharp.Core/Primitives/Float/Float4.cs b/src/ComputeSharp.Core/Primitives/Float/Float4.cs index 67a4692c..0571ccd0 100644 --- a/src/ComputeSharp.Core/Primitives/Float/Float4.cs +++ b/src/ComputeSharp.Core/Primitives/Float/Float4.cs @@ -55,6 +55,73 @@ namespace ComputeSharp this.w = w; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + /// The value to assign to the fourth vector component. + public Float4(Float2 xy, float z, float w) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second vector component. + /// The value to assign to the third and fourth vector components. + public Float4(float x, float y, Float2 zw) + { + this.x = x; + this.y = y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third and fourth vector components. + public Float4(Float2 xy, Float2 zw) + { + this.x = xy.X; + this.y = xy.Y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first, second and third vector components. + /// The value to assign to the fourth vector component. + public Float4(Float3 xyz, float w) + { + this.x = xyz.X; + this.y = xyz.Y; + this.z = xyz.Z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second, third and fourth vector components. + public Float4(float x, Float3 yzw) + { + this.x = x; + this.y = yzw.X; + this.z = yzw.Y; + this.w = yzw.Z; + } + /// /// Creates a new value with the same value for all its components. /// diff --git a/src/ComputeSharp.Core/Primitives/Int/Int3.cs b/src/ComputeSharp.Core/Primitives/Int/Int3.cs index d8011590..1a7a30b6 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int3.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int3.cs @@ -47,6 +47,30 @@ namespace ComputeSharp this.z = z; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + public Int3(Int2 xy, int z) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second and thirt vector components. + public Int3(int x, Int2 yz) + { + this.x = x; + this.y = yz.X; + this.z = yz.Y; + } + /// /// Creates a new value with the same value for all its components. /// diff --git a/src/ComputeSharp.Core/Primitives/Int/Int4.cs b/src/ComputeSharp.Core/Primitives/Int/Int4.cs index a11f745c..f7dd8298 100644 --- a/src/ComputeSharp.Core/Primitives/Int/Int4.cs +++ b/src/ComputeSharp.Core/Primitives/Int/Int4.cs @@ -54,6 +54,73 @@ namespace ComputeSharp this.w = w; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + /// The value to assign to the fourth vector component. + public Int4(Int2 xy, int z, int w) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second vector component. + /// The value to assign to the third and fourth vector components. + public Int4(int x, int y, Int2 zw) + { + this.x = x; + this.y = y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third and fourth vector components. + public Int4(Int2 xy, Int2 zw) + { + this.x = xy.X; + this.y = xy.Y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first, second and third vector components. + /// The value to assign to the fourth vector component. + public Int4(Int3 xyz, int w) + { + this.x = xyz.X; + this.y = xyz.Y; + this.z = xyz.Z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second, third and fourth vector components. + public Int4(int x, Int3 yzw) + { + this.x = x; + this.y = yzw.X; + this.z = yzw.Y; + this.w = yzw.Z; + } + /// /// Creates a new value with the same value for all its components. /// diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs index ea4124ed..a0cbfa7b 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt3.cs @@ -47,6 +47,30 @@ namespace ComputeSharp this.z = z; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + public UInt3(UInt2 xy, uint z) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second and thirt vector components. + public UInt3(uint x, UInt2 yz) + { + this.x = x; + this.y = yz.X; + this.z = yz.Y; + } + /// /// Creates a new value with the same value for all its components. /// diff --git a/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs b/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs index a9253987..453c9495 100644 --- a/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs +++ b/src/ComputeSharp.Core/Primitives/UInt/UInt4.cs @@ -54,6 +54,73 @@ namespace ComputeSharp this.w = w; } + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third vector component. + /// The value to assign to the fourth vector component. + public UInt4(UInt2 xy, uint z, uint w) + { + this.x = xy.X; + this.y = xy.Y; + this.z = z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second vector component. + /// The value to assign to the third and fourth vector components. + public UInt4(uint x, uint y, UInt2 zw) + { + this.x = x; + this.y = y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first and second vector components. + /// The value to assign to the third and fourth vector components. + public UInt4(UInt2 xy, UInt2 zw) + { + this.x = xy.X; + this.y = xy.Y; + this.z = zw.X; + this.w = zw.Y; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first, second and third vector components. + /// The value to assign to the fourth vector component. + public UInt4(UInt3 xyz, uint w) + { + this.x = xyz.X; + this.y = xyz.Y; + this.z = xyz.Z; + this.w = w; + } + + /// + /// Creates a new instance with the specified parameters. + /// + /// The value to assign to the first vector component. + /// The value to assign to the second, third and fourth vector components. + public UInt4(uint x, UInt3 yzw) + { + this.x = x; + this.y = yzw.X; + this.z = yzw.Y; + this.w = yzw.Z; + } + /// /// Creates a new value with the same value for all its components. ///