Added ComputeSharp.Core project

このコミットが含まれているのは:
Sergio Pedri committed 2019-08-26 14:05:08 +02:00
1 親 4df5adc14f
コミット f748e45473
17ファイル変更
+22139

検索条件に一致するファイルはありません

+7
ファイルの表示
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
</Project>
+16
ファイルの表示
@@ -0,0 +1,16 @@
using System;
namespace ComputeSharp.Exceptions
{
/// <summary>
/// A custom <see cref="InvalidOperationException"/> that indicates when an HLSL-only API is called from C#
/// </summary>
public sealed class InvalidExecutionContextException : InvalidOperationException
{
/// <summary>
/// Creates a new <see cref="InvalidExecutionContextException"/> instance
/// </summary>
/// <param name="name">The name of the caller API</param>
internal InvalidExecutionContextException(string name) : base($"The API {name} can only be used from within an HLSL shader") { }
}
}
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+171
ファイルの表示
@@ -0,0 +1,171 @@
using System.Runtime.InteropServices;
using ComputeSharp.Exceptions;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that maps the double2 HLSL type
/// </summary>
[StructLayout(LayoutKind.Sequential, Size = sizeof(double) * 2)]
public struct Double2
{
/// <summary>
/// Gets an <see cref="Double2"/> value with all components set to 0
/// </summary>
public static Double2 Zero { get; } = 0;
/// <summary>
/// Gets an <see cref="Double2"/> value with all components set to 1
/// </summary>
public static Double2 One { get; } = 1;
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="X"/> component set to 1, and the others to 0
/// </summary>
public static Double2 UnitX { get; } = new Double2(1, 0);
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="Y"/> component set to 1, and the others to 0
/// </summary>
public static Double2 UnitY { get; } = new Double2(0, 1);
/// <summary>
/// Creates a new <see cref="Double2"/> instance with the specified parameters
/// </summary>
/// <param name="x">The value to assign to the first vector component</param>
/// <param name="y">The value to assign to the second vector component</param>
public Double2(double x, double y)
{
X = x;
Y = y;
}
/// <summary>
/// Gets or sets the value of the first vector component
/// </summary>
public double X { get; set; }
/// <summary>
/// Gets or sets the value of the second vector component
/// </summary>
public double Y { get; set; }
/// <summary>
/// Gets or sets the value of the first color component
/// </summary>
public double R
{
get => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(R)}");
set => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(R)}");
}
/// <summary>
/// Gets or sets the value of the second color component
/// </summary>
public double G
{
get => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(G)}");
set => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(G)}");
}
/// <summary>
/// Gets or sets a specific component in the current <see cref="Double2"/> instance
/// </summary>
/// <param name="i">The index of the component to access</param>
public double this[int i]
{
get => throw new InvalidExecutionContextException($"{nameof(Double2)}[int]");
set => throw new InvalidExecutionContextException($"{nameof(Double2)}[int]");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="X"/> value for all components
/// </summary>
public Double2 XX => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(XX)}");
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Double2 XY
{
get => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(XY)}");
set => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(XY)}");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Double2 YX
{
get => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(YX)}");
set => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(YX)}");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="Y"/> value for all components
/// </summary>
public Double2 YY => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(YY)}");
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="R"/> value for all components
/// </summary>
public Double2 RR => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(RR)}");
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Double2 RG
{
get => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(RG)}");
set => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(RG)}");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Double2 GR
{
get => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(GR)}");
set => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(GR)}");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="G"/> value for all components
/// </summary>
public Double2 GG => throw new InvalidExecutionContextException($"{nameof(Double2)}.{nameof(GG)}");
/// <summary>
/// Creates a new <see cref="Double2"/> value with the same value for all its components
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double2"/> instance</param>
public static implicit operator Double2(double x) => new Double2(x, x);
/// <summary>
/// Sums two <see cref="Double2"/> values
/// </summary>
/// <param name="left">The first <see cref="Double2"/> value to sum</param>
/// <param name="right">The second <see cref="Double2"/> value to sum</param>
public static Double2 operator +(Double2 left, Double2 right) => throw new InvalidExecutionContextException($"{nameof(Double2)}.+");
/// <summary>
/// Divides two <see cref="Double2"/> values
/// </summary>
/// <param name="left">The first <see cref="Double2"/> value to divide</param>
/// <param name="right">The second <see cref="Double2"/> value to divide</param>
public static Double2 operator /(Double2 left, Double2 right) => throw new InvalidExecutionContextException($"{nameof(Double2)}./");
/// <summary>
/// Multiplies two <see cref="Double2"/> values
/// </summary>
/// <param name="left">The first <see cref="Double2"/> value to multiply</param>
/// <param name="right">The second <see cref="Double2"/> value to multiply</param>
public static Double2 operator *(Double2 left, Double2 right) => throw new InvalidExecutionContextException($"{nameof(Double2)}.*");
/// <summary>
/// Subtracts two <see cref="Double2"/> values
/// </summary>
/// <param name="left">The first <see cref="Double2"/> value to subtract</param>
/// <param name="right">The second <see cref="Double2"/> value to subtract</param>
public static Double2 operator -(Double2 left, Double2 right) => throw new InvalidExecutionContextException($"{nameof(Double2)}.-");
}
}
+592
ファイルの表示
@@ -0,0 +1,592 @@
using System.Runtime.InteropServices;
using ComputeSharp.Exceptions;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that maps the double3 HLSL type
/// </summary>
[StructLayout(LayoutKind.Sequential, Size = sizeof(double) * 3)]
public struct Double3
{
/// <summary>
/// Gets an <see cref="Double3"/> value with all components set to 0
/// </summary>
public static Double3 Zero { get; } = 0;
/// <summary>
/// Gets an <see cref="Double3"/> value with all components set to 1
/// </summary>
public static Double3 One { get; } = 1;
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="X"/> component set to 1, and the others to 0
/// </summary>
public static Double3 UnitX { get; } = new Double3(1, 0, 0);
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Y"/> component set to 1, and the others to 0
/// </summary>
public static Double3 UnitY { get; } = new Double3(0, 1, 0);
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Z"/> component set to 1, and the others to 0
/// </summary>
public static Double3 UnitZ { get; } = new Double3(0, 0, 1);
/// <summary>
/// Creates a new <see cref="Double3"/> instance with the specified parameters
/// </summary>
/// <param name="x">The value to assign to the first vector component</param>
/// <param name="y">The value to assign to the second vector component</param>
/// <param name="z">The value to assign to the third vector component</param>
public Double3(double x, double y, double z)
{
X = x;
Y = y;
Z = z;
}
/// <summary>
/// Gets or sets the value of the first vector component
/// </summary>
public double X { get; set; }
/// <summary>
/// Gets or sets the value of the second vector component
/// </summary>
public double Y { get; set; }
/// <summary>
/// Gets or sets the value of the third vector component
/// </summary>
public double Z { get; set; }
/// <summary>
/// Gets or sets the value of the first color component
/// </summary>
public double R
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(R)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(R)}");
}
/// <summary>
/// Gets or sets the value of the second color component
/// </summary>
public double G
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(G)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(G)}");
}
/// <summary>
/// Gets or sets the value of the third color component
/// </summary>
public double B
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(B)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(B)}");
}
/// <summary>
/// Gets or sets a specific component in the current <see cref="Double3"/> instance
/// </summary>
/// <param name="i">The index of the component to access</param>
public double this[int i]
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}[int]");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}[int]");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="X"/> value for all components
/// </summary>
public Double2 XX => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XX)}");
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Double2 XY
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XY)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XY)}");
}
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Double2 XZ
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XZ)}");
}
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Double2 YX
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YX)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YX)}");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="Y"/> value for all components
/// </summary>
public Double2 YY => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YY)}");
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Double2 YZ
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YZ)}");
}
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Double2 ZX
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZX)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZX)}");
}
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Double2 ZY
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZY)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZY)}");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="Z"/> value for all components
/// </summary>
public Double2 ZZ => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZZ)}");
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="R"/> value for all components
/// </summary>
public Double2 RR => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RR)}");
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Double2 RG
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RG)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RG)}");
}
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Double2 RB
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RB)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RB)}");
}
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Double2 GR
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GR)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GR)}");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="G"/> value for all components
/// </summary>
public Double2 GG => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GG)}");
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Double2 GB
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GB)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GB)}");
}
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Double2 BR
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BR)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BR)}");
}
/// <summary>
/// Gets or sets an <see cref="Double2"/> value with the <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Double2 BG
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BG)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BG)}");
}
/// <summary>
/// Gets an <see cref="Double2"/> value with the <see cref="B"/> value for all components
/// </summary>
public Double2 BB => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BB)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="X"/> value for all components
/// </summary>
public Double2 XXX => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XXX)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="X"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Double2 XXY => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XXY)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="X"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Double2 XXZ => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XXZ)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Double2 XYX => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XYX)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="Y"/> values
/// </summary>
public Double2 XYY => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XYY)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Double2 XYZ
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XYZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XYZ)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Double2 XZX => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XZX)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Double2 XZY
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XZY)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XZY)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public Double2 XZZ => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(XZZ)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="X"/> values
/// </summary>
public Double2 YXX => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YXX)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Double2 YXY => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YXY)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Double2 YXZ
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YXZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YXZ)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Y"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Double2 YYX => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YYX)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Y"/> value for all components
/// </summary>
public Double2 YYY => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YYY)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Y"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Double2 YYZ => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YYZ)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Double2 YZX
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YZX)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YZX)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Double2 YZY => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YZY)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public Double2 YZZ => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(YZZ)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public Double2 ZXX => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZXX)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="Z"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Double2 ZXY
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZXY)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZXY)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Z"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Double2 ZXZ => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZXZ)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Double2 ZYX
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZYX)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZYX)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="Y"/> values
/// </summary>
public Double2 ZYY => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZYY)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Double2 ZYZ => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZYZ)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Double2 ZZX => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZZX)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Double2 ZZY => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZZY)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="Z"/> value for all components
/// </summary>
public Double2 ZZZ => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(ZZZ)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="R"/> value for all components
/// </summary>
public Double2 RRR => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RRR)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="R"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Double2 RRG => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RRG)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="R"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Double2 RRB => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RRB)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Double2 RGR => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RGR)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="G"/> values
/// </summary>
public Double2 RGG => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RGG)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Double2 RGB
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RGB)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RGB)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Double2 RBR => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RBR)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Double2 RBG
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RBG)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RBG)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public Double2 RBB => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(RBB)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="R"/> values
/// </summary>
public Double2 GRR => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GRR)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Double2 GRG => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GRG)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Double2 GRB
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GRB)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GRB)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="G"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Double2 GGR => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GGR)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="G"/> value for all components
/// </summary>
public Double2 GGG => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GGG)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="G"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Double2 GGB => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GGB)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Double2 GBR
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GBR)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GBR)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Double2 GBG => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GBG)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public Double2 GBB => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(GBB)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public Double2 BRR => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BRR)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="B"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Double2 BRG
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BRG)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BRG)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="B"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Double2 BRB => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BRB)}");
/// <summary>
/// Gets or sets an <see cref="Double3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Double2 BGR
{
get => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BGR)}");
set => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BGR)}");
}
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="G"/> values
/// </summary>
public Double2 BGG => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BGG)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Double2 BGB => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BGB)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Double2 BBR => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BBR)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Double2 BBG => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BBG)}");
/// <summary>
/// Gets an <see cref="Double3"/> value with the <see cref="B"/> value for all components
/// </summary>
public Double2 BBB => throw new InvalidExecutionContextException($"{nameof(Double3)}.{nameof(BBB)}");
/// <summary>
/// Creates a new <see cref="Double3"/> value with the same value for all its components
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Double3"/> instance</param>
public static implicit operator Double3(double x) => new Double3(x, x, x);
/// <summary>
/// Sums two <see cref="Double3"/> values
/// </summary>
/// <param name="left">The first <see cref="Double3"/> value to sum</param>
/// <param name="right">The second <see cref="Double3"/> value to sum</param>
public static Double3 operator +(Double3 left, Double3 right) => throw new InvalidExecutionContextException($"{nameof(Double3)}.+");
/// <summary>
/// Divides two <see cref="Double3"/> values
/// </summary>
/// <param name="left">The first <see cref="Double3"/> value to divide</param>
/// <param name="right">The second <see cref="Double3"/> value to divide</param>
public static Double3 operator /(Double3 left, Double3 right) => throw new InvalidExecutionContextException($"{nameof(Double3)}./");
/// <summary>
/// Multiplies two <see cref="Double3"/> values
/// </summary>
/// <param name="left">The first <see cref="Double3"/> value to multiply</param>
/// <param name="right">The second <see cref="Double3"/> value to multiply</param>
public static Double3 operator *(Double3 left, Double3 right) => throw new InvalidExecutionContextException($"{nameof(Double3)}.*");
/// <summary>
/// Subtracts two <see cref="Double3"/> values
/// </summary>
/// <param name="left">The first <see cref="Double3"/> value to subtract</param>
/// <param name="right">The second <see cref="Double3"/> value to subtract</param>
public static Double3 operator -(Double3 left, Double3 right) => throw new InvalidExecutionContextException($"{nameof(Double3)}.-");
}
}
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+171
ファイルの表示
@@ -0,0 +1,171 @@
using System.Runtime.InteropServices;
using ComputeSharp.Exceptions;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that maps the float2 HLSL type
/// </summary>
[StructLayout(LayoutKind.Sequential, Size = sizeof(float) * 2)]
public struct Float2
{
/// <summary>
/// Gets an <see cref="Float2"/> value with all components set to 0
/// </summary>
public static Float2 Zero { get; } = 0;
/// <summary>
/// Gets an <see cref="Float2"/> value with all components set to 1
/// </summary>
public static Float2 One { get; } = 1;
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="X"/> component set to 1, and the others to 0
/// </summary>
public static Float2 UnitX { get; } = new Float2(1, 0);
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="Y"/> component set to 1, and the others to 0
/// </summary>
public static Float2 UnitY { get; } = new Float2(0, 1);
/// <summary>
/// Creates a new <see cref="Float2"/> instance with the specified parameters
/// </summary>
/// <param name="x">The value to assign to the first vector component</param>
/// <param name="y">The value to assign to the second vector component</param>
public Float2(float x, float y)
{
X = x;
Y = y;
}
/// <summary>
/// Gets or sets the value of the first vector component
/// </summary>
public float X { get; set; }
/// <summary>
/// Gets or sets the value of the second vector component
/// </summary>
public float Y { get; set; }
/// <summary>
/// Gets or sets the value of the first color component
/// </summary>
public float R
{
get => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(R)}");
set => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(R)}");
}
/// <summary>
/// Gets or sets the value of the second color component
/// </summary>
public float G
{
get => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(G)}");
set => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(G)}");
}
/// <summary>
/// Gets or sets a specific component in the current <see cref="Float2"/> instance
/// </summary>
/// <param name="i">The index of the component to access</param>
public float this[int i]
{
get => throw new InvalidExecutionContextException($"{nameof(Float2)}[int]");
set => throw new InvalidExecutionContextException($"{nameof(Float2)}[int]");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="X"/> value for all components
/// </summary>
public Float2 XX => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(XX)}");
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Float2 XY
{
get => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(XY)}");
set => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(XY)}");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Float2 YX
{
get => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(YX)}");
set => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(YX)}");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="Y"/> value for all components
/// </summary>
public Float2 YY => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(YY)}");
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="R"/> value for all components
/// </summary>
public Float2 RR => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(RR)}");
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Float2 RG
{
get => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(RG)}");
set => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(RG)}");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Float2 GR
{
get => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(GR)}");
set => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(GR)}");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="G"/> value for all components
/// </summary>
public Float2 GG => throw new InvalidExecutionContextException($"{nameof(Float2)}.{nameof(GG)}");
/// <summary>
/// Creates a new <see cref="Float2"/> value with the same value for all its components
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float2"/> instance</param>
public static implicit operator Float2(float x) => new Float2(x, x);
/// <summary>
/// Sums two <see cref="Float2"/> values
/// </summary>
/// <param name="left">The first <see cref="Float2"/> value to sum</param>
/// <param name="right">The second <see cref="Float2"/> value to sum</param>
public static Float2 operator +(Float2 left, Float2 right) => throw new InvalidExecutionContextException($"{nameof(Float2)}.+");
/// <summary>
/// Divides two <see cref="Float2"/> values
/// </summary>
/// <param name="left">The first <see cref="Float2"/> value to divide</param>
/// <param name="right">The second <see cref="Float2"/> value to divide</param>
public static Float2 operator /(Float2 left, Float2 right) => throw new InvalidExecutionContextException($"{nameof(Float2)}./");
/// <summary>
/// Multiplies two <see cref="Float2"/> values
/// </summary>
/// <param name="left">The first <see cref="Float2"/> value to multiply</param>
/// <param name="right">The second <see cref="Float2"/> value to multiply</param>
public static Float2 operator *(Float2 left, Float2 right) => throw new InvalidExecutionContextException($"{nameof(Float2)}.*");
/// <summary>
/// Subtracts two <see cref="Float2"/> values
/// </summary>
/// <param name="left">The first <see cref="Float2"/> value to subtract</param>
/// <param name="right">The second <see cref="Float2"/> value to subtract</param>
public static Float2 operator -(Float2 left, Float2 right) => throw new InvalidExecutionContextException($"{nameof(Float2)}.-");
}
}
+592
ファイルの表示
@@ -0,0 +1,592 @@
using System.Runtime.InteropServices;
using ComputeSharp.Exceptions;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that maps the float3 HLSL type
/// </summary>
[StructLayout(LayoutKind.Sequential, Size = sizeof(float) * 3)]
public struct Float3
{
/// <summary>
/// Gets an <see cref="Float3"/> value with all components set to 0
/// </summary>
public static Float3 Zero { get; } = 0;
/// <summary>
/// Gets an <see cref="Float3"/> value with all components set to 1
/// </summary>
public static Float3 One { get; } = 1;
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="X"/> component set to 1, and the others to 0
/// </summary>
public static Float3 UnitX { get; } = new Float3(1, 0, 0);
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Y"/> component set to 1, and the others to 0
/// </summary>
public static Float3 UnitY { get; } = new Float3(0, 1, 0);
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Z"/> component set to 1, and the others to 0
/// </summary>
public static Float3 UnitZ { get; } = new Float3(0, 0, 1);
/// <summary>
/// Creates a new <see cref="Float3"/> instance with the specified parameters
/// </summary>
/// <param name="x">The value to assign to the first vector component</param>
/// <param name="y">The value to assign to the second vector component</param>
/// <param name="z">The value to assign to the third vector component</param>
public Float3(float x, float y, float z)
{
X = x;
Y = y;
Z = z;
}
/// <summary>
/// Gets or sets the value of the first vector component
/// </summary>
public float X { get; set; }
/// <summary>
/// Gets or sets the value of the second vector component
/// </summary>
public float Y { get; set; }
/// <summary>
/// Gets or sets the value of the third vector component
/// </summary>
public float Z { get; set; }
/// <summary>
/// Gets or sets the value of the first color component
/// </summary>
public float R
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(R)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(R)}");
}
/// <summary>
/// Gets or sets the value of the second color component
/// </summary>
public float G
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(G)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(G)}");
}
/// <summary>
/// Gets or sets the value of the third color component
/// </summary>
public float B
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(B)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(B)}");
}
/// <summary>
/// Gets or sets a specific component in the current <see cref="Float3"/> instance
/// </summary>
/// <param name="i">The index of the component to access</param>
public float this[int i]
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}[int]");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}[int]");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="X"/> value for all components
/// </summary>
public Float2 XX => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XX)}");
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Float2 XY
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XY)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XY)}");
}
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Float2 XZ
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XZ)}");
}
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Float2 YX
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YX)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YX)}");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="Y"/> value for all components
/// </summary>
public Float2 YY => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YY)}");
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Float2 YZ
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YZ)}");
}
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Float2 ZX
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZX)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZX)}");
}
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Float2 ZY
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZY)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZY)}");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="Z"/> value for all components
/// </summary>
public Float2 ZZ => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZZ)}");
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="R"/> value for all components
/// </summary>
public Float2 RR => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RR)}");
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Float2 RG
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RG)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RG)}");
}
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Float2 RB
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RB)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RB)}");
}
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Float2 GR
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GR)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GR)}");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="G"/> value for all components
/// </summary>
public Float2 GG => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GG)}");
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Float2 GB
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GB)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GB)}");
}
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Float2 BR
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BR)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BR)}");
}
/// <summary>
/// Gets or sets an <see cref="Float2"/> value with the <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Float2 BG
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BG)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BG)}");
}
/// <summary>
/// Gets an <see cref="Float2"/> value with the <see cref="B"/> value for all components
/// </summary>
public Float2 BB => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BB)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="X"/> value for all components
/// </summary>
public Float2 XXX => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XXX)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="X"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Float2 XXY => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XXY)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="X"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Float2 XXZ => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XXZ)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Float2 XYX => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XYX)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="Y"/> values
/// </summary>
public Float2 XYY => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XYY)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Float2 XYZ
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XYZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XYZ)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Float2 XZX => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XZX)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Float2 XZY
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XZY)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XZY)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public Float2 XZZ => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(XZZ)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="X"/> values
/// </summary>
public Float2 YXX => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YXX)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Float2 YXY => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YXY)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Float2 YXZ
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YXZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YXZ)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Y"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Float2 YYX => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YYX)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Y"/> value for all components
/// </summary>
public Float2 YYY => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YYY)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Y"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Float2 YYZ => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YYZ)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Float2 YZX
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YZX)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YZX)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Float2 YZY => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YZY)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public Float2 YZZ => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(YZZ)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public Float2 ZXX => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZXX)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="Z"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Float2 ZXY
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZXY)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZXY)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Z"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Float2 ZXZ => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZXZ)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Float2 ZYX
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZYX)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZYX)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="Y"/> values
/// </summary>
public Float2 ZYY => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZYY)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Float2 ZYZ => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZYZ)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Float2 ZZX => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZZX)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Float2 ZZY => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZZY)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="Z"/> value for all components
/// </summary>
public Float2 ZZZ => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(ZZZ)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="R"/> value for all components
/// </summary>
public Float2 RRR => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RRR)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="R"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Float2 RRG => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RRG)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="R"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Float2 RRB => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RRB)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Float2 RGR => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RGR)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="G"/> values
/// </summary>
public Float2 RGG => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RGG)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Float2 RGB
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RGB)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RGB)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Float2 RBR => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RBR)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Float2 RBG
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RBG)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RBG)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public Float2 RBB => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(RBB)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="R"/> values
/// </summary>
public Float2 GRR => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GRR)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Float2 GRG => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GRG)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Float2 GRB
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GRB)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GRB)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="G"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Float2 GGR => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GGR)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="G"/> value for all components
/// </summary>
public Float2 GGG => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GGG)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="G"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Float2 GGB => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GGB)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Float2 GBR
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GBR)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GBR)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Float2 GBG => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GBG)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public Float2 GBB => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(GBB)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public Float2 BRR => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BRR)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="B"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Float2 BRG
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BRG)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BRG)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="B"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Float2 BRB => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BRB)}");
/// <summary>
/// Gets or sets an <see cref="Float3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Float2 BGR
{
get => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BGR)}");
set => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BGR)}");
}
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="G"/> values
/// </summary>
public Float2 BGG => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BGG)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Float2 BGB => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BGB)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Float2 BBR => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BBR)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Float2 BBG => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BBG)}");
/// <summary>
/// Gets an <see cref="Float3"/> value with the <see cref="B"/> value for all components
/// </summary>
public Float2 BBB => throw new InvalidExecutionContextException($"{nameof(Float3)}.{nameof(BBB)}");
/// <summary>
/// Creates a new <see cref="Float3"/> value with the same value for all its components
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Float3"/> instance</param>
public static implicit operator Float3(float x) => new Float3(x, x, x);
/// <summary>
/// Sums two <see cref="Float3"/> values
/// </summary>
/// <param name="left">The first <see cref="Float3"/> value to sum</param>
/// <param name="right">The second <see cref="Float3"/> value to sum</param>
public static Float3 operator +(Float3 left, Float3 right) => throw new InvalidExecutionContextException($"{nameof(Float3)}.+");
/// <summary>
/// Divides two <see cref="Float3"/> values
/// </summary>
/// <param name="left">The first <see cref="Float3"/> value to divide</param>
/// <param name="right">The second <see cref="Float3"/> value to divide</param>
public static Float3 operator /(Float3 left, Float3 right) => throw new InvalidExecutionContextException($"{nameof(Float3)}./");
/// <summary>
/// Multiplies two <see cref="Float3"/> values
/// </summary>
/// <param name="left">The first <see cref="Float3"/> value to multiply</param>
/// <param name="right">The second <see cref="Float3"/> value to multiply</param>
public static Float3 operator *(Float3 left, Float3 right) => throw new InvalidExecutionContextException($"{nameof(Float3)}.*");
/// <summary>
/// Subtracts two <see cref="Float3"/> values
/// </summary>
/// <param name="left">The first <see cref="Float3"/> value to subtract</param>
/// <param name="right">The second <see cref="Float3"/> value to subtract</param>
public static Float3 operator -(Float3 left, Float3 right) => throw new InvalidExecutionContextException($"{nameof(Float3)}.-");
}
}
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+171
ファイルの表示
@@ -0,0 +1,171 @@
using System.Runtime.InteropServices;
using ComputeSharp.Exceptions;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that maps the int2 HLSL type
/// </summary>
[StructLayout(LayoutKind.Sequential, Size = sizeof(int) * 2)]
public struct Int2
{
/// <summary>
/// Gets an <see cref="Int2"/> value with all components set to 0
/// </summary>
public static Int2 Zero { get; } = 0;
/// <summary>
/// Gets an <see cref="Int2"/> value with all components set to 1
/// </summary>
public static Int2 One { get; } = 1;
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="X"/> component set to 1, and the others to 0
/// </summary>
public static Int2 UnitX { get; } = new Int2(1, 0);
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="Y"/> component set to 1, and the others to 0
/// </summary>
public static Int2 UnitY { get; } = new Int2(0, 1);
/// <summary>
/// Creates a new <see cref="Int2"/> instance with the specified parameters
/// </summary>
/// <param name="x">The value to assign to the first vector component</param>
/// <param name="y">The value to assign to the second vector component</param>
public Int2(int x, int y)
{
X = x;
Y = y;
}
/// <summary>
/// Gets or sets the value of the first vector component
/// </summary>
public int X { get; set; }
/// <summary>
/// Gets or sets the value of the second vector component
/// </summary>
public int Y { get; set; }
/// <summary>
/// Gets or sets the value of the first color component
/// </summary>
public int R
{
get => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(R)}");
set => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(R)}");
}
/// <summary>
/// Gets or sets the value of the second color component
/// </summary>
public int G
{
get => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(G)}");
set => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(G)}");
}
/// <summary>
/// Gets or sets a specific component in the current <see cref="Int2"/> instance
/// </summary>
/// <param name="i">The index of the component to access</param>
public int this[int i]
{
get => throw new InvalidExecutionContextException($"{nameof(Int2)}[int]");
set => throw new InvalidExecutionContextException($"{nameof(Int2)}[int]");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="X"/> value for all components
/// </summary>
public Int2 XX => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(XX)}");
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Int2 XY
{
get => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(XY)}");
set => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(XY)}");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Int2 YX
{
get => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(YX)}");
set => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(YX)}");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="Y"/> value for all components
/// </summary>
public Int2 YY => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(YY)}");
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="R"/> value for all components
/// </summary>
public Int2 RR => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(RR)}");
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Int2 RG
{
get => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(RG)}");
set => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(RG)}");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Int2 GR
{
get => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(GR)}");
set => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(GR)}");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="G"/> value for all components
/// </summary>
public Int2 GG => throw new InvalidExecutionContextException($"{nameof(Int2)}.{nameof(GG)}");
/// <summary>
/// Creates a new <see cref="Int2"/> value with the same value for all its components
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int2"/> instance</param>
public static implicit operator Int2(int x) => new Int2(x, x);
/// <summary>
/// Sums two <see cref="Int2"/> values
/// </summary>
/// <param name="left">The first <see cref="Int2"/> value to sum</param>
/// <param name="right">The second <see cref="Int2"/> value to sum</param>
public static Int2 operator +(Int2 left, Int2 right) => throw new InvalidExecutionContextException($"{nameof(Int2)}.+");
/// <summary>
/// Divides two <see cref="Int2"/> values
/// </summary>
/// <param name="left">The first <see cref="Int2"/> value to divide</param>
/// <param name="right">The second <see cref="Int2"/> value to divide</param>
public static Int2 operator /(Int2 left, Int2 right) => throw new InvalidExecutionContextException($"{nameof(Int2)}./");
/// <summary>
/// Multiplies two <see cref="Int2"/> values
/// </summary>
/// <param name="left">The first <see cref="Int2"/> value to multiply</param>
/// <param name="right">The second <see cref="Int2"/> value to multiply</param>
public static Int2 operator *(Int2 left, Int2 right) => throw new InvalidExecutionContextException($"{nameof(Int2)}.*");
/// <summary>
/// Subtracts two <see cref="Int2"/> values
/// </summary>
/// <param name="left">The first <see cref="Int2"/> value to subtract</param>
/// <param name="right">The second <see cref="Int2"/> value to subtract</param>
public static Int2 operator -(Int2 left, Int2 right) => throw new InvalidExecutionContextException($"{nameof(Int2)}.-");
}
}
+592
ファイルの表示
@@ -0,0 +1,592 @@
using System.Runtime.InteropServices;
using ComputeSharp.Exceptions;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that maps the int3 HLSL type
/// </summary>
[StructLayout(LayoutKind.Sequential, Size = sizeof(int) * 3)]
public struct Int3
{
/// <summary>
/// Gets an <see cref="Int3"/> value with all components set to 0
/// </summary>
public static Int3 Zero { get; } = 0;
/// <summary>
/// Gets an <see cref="Int3"/> value with all components set to 1
/// </summary>
public static Int3 One { get; } = 1;
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="X"/> component set to 1, and the others to 0
/// </summary>
public static Int3 UnitX { get; } = new Int3(1, 0, 0);
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Y"/> component set to 1, and the others to 0
/// </summary>
public static Int3 UnitY { get; } = new Int3(0, 1, 0);
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Z"/> component set to 1, and the others to 0
/// </summary>
public static Int3 UnitZ { get; } = new Int3(0, 0, 1);
/// <summary>
/// Creates a new <see cref="Int3"/> instance with the specified parameters
/// </summary>
/// <param name="x">The value to assign to the first vector component</param>
/// <param name="y">The value to assign to the second vector component</param>
/// <param name="z">The value to assign to the third vector component</param>
public Int3(int x, int y, int z)
{
X = x;
Y = y;
Z = z;
}
/// <summary>
/// Gets or sets the value of the first vector component
/// </summary>
public int X { get; set; }
/// <summary>
/// Gets or sets the value of the second vector component
/// </summary>
public int Y { get; set; }
/// <summary>
/// Gets or sets the value of the third vector component
/// </summary>
public int Z { get; set; }
/// <summary>
/// Gets or sets the value of the first color component
/// </summary>
public int R
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(R)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(R)}");
}
/// <summary>
/// Gets or sets the value of the second color component
/// </summary>
public int G
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(G)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(G)}");
}
/// <summary>
/// Gets or sets the value of the third color component
/// </summary>
public int B
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(B)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(B)}");
}
/// <summary>
/// Gets or sets a specific component in the current <see cref="Int3"/> instance
/// </summary>
/// <param name="i">The index of the component to access</param>
public int this[int i]
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}[int]");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}[int]");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="X"/> value for all components
/// </summary>
public Int2 XX => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XX)}");
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Int2 XY
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XY)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XY)}");
}
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Int2 XZ
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XZ)}");
}
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Int2 YX
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YX)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YX)}");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="Y"/> value for all components
/// </summary>
public Int2 YY => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YY)}");
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Int2 YZ
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YZ)}");
}
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Int2 ZX
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZX)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZX)}");
}
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Int2 ZY
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZY)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZY)}");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="Z"/> value for all components
/// </summary>
public Int2 ZZ => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZZ)}");
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="R"/> value for all components
/// </summary>
public Int2 RR => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RR)}");
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Int2 RG
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RG)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RG)}");
}
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Int2 RB
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RB)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RB)}");
}
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Int2 GR
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GR)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GR)}");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="G"/> value for all components
/// </summary>
public Int2 GG => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GG)}");
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Int2 GB
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GB)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GB)}");
}
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Int2 BR
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BR)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BR)}");
}
/// <summary>
/// Gets or sets an <see cref="Int2"/> value with the <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Int2 BG
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BG)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BG)}");
}
/// <summary>
/// Gets an <see cref="Int2"/> value with the <see cref="B"/> value for all components
/// </summary>
public Int2 BB => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BB)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="X"/> value for all components
/// </summary>
public Int2 XXX => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XXX)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="X"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Int2 XXY => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XXY)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="X"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Int2 XXZ => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XXZ)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Int2 XYX => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XYX)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="Y"/> values
/// </summary>
public Int2 XYY => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XYY)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Int2 XYZ
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XYZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XYZ)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Int2 XZX => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XZX)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Int2 XZY
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XZY)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XZY)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public Int2 XZZ => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(XZZ)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="X"/> values
/// </summary>
public Int2 YXX => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YXX)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Int2 YXY => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YXY)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Int2 YXZ
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YXZ)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YXZ)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Y"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Int2 YYX => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YYX)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Y"/> value for all components
/// </summary>
public Int2 YYY => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YYY)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Y"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Int2 YYZ => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YYZ)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Int2 YZX
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YZX)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YZX)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Int2 YZY => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YZY)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public Int2 YZZ => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(YZZ)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public Int2 ZXX => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZXX)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="Z"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public Int2 ZXY
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZXY)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZXY)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Z"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public Int2 ZXZ => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZXZ)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public Int2 ZYX
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZYX)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZYX)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="Y"/> values
/// </summary>
public Int2 ZYY => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZYY)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public Int2 ZYZ => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZYZ)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public Int2 ZZX => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZZX)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public Int2 ZZY => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZZY)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="Z"/> value for all components
/// </summary>
public Int2 ZZZ => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(ZZZ)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="R"/> value for all components
/// </summary>
public Int2 RRR => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RRR)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="R"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Int2 RRG => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RRG)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="R"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Int2 RRB => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RRB)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Int2 RGR => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RGR)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="G"/> values
/// </summary>
public Int2 RGG => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RGG)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Int2 RGB
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RGB)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RGB)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Int2 RBR => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RBR)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Int2 RBG
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RBG)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RBG)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public Int2 RBB => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(RBB)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="R"/> values
/// </summary>
public Int2 GRR => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GRR)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Int2 GRG => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GRG)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Int2 GRB
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GRB)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GRB)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="G"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Int2 GGR => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GGR)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="G"/> value for all components
/// </summary>
public Int2 GGG => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GGG)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="G"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Int2 GGB => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GGB)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Int2 GBR
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GBR)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GBR)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Int2 GBG => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GBG)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public Int2 GBB => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(GBB)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public Int2 BRR => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BRR)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="B"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public Int2 BRG
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BRG)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BRG)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="B"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public Int2 BRB => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BRB)}");
/// <summary>
/// Gets or sets an <see cref="Int3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public Int2 BGR
{
get => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BGR)}");
set => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BGR)}");
}
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="G"/> values
/// </summary>
public Int2 BGG => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BGG)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public Int2 BGB => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BGB)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public Int2 BBR => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BBR)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public Int2 BBG => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BBG)}");
/// <summary>
/// Gets an <see cref="Int3"/> value with the <see cref="B"/> value for all components
/// </summary>
public Int2 BBB => throw new InvalidExecutionContextException($"{nameof(Int3)}.{nameof(BBB)}");
/// <summary>
/// Creates a new <see cref="Int3"/> value with the same value for all its components
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="Int3"/> instance</param>
public static implicit operator Int3(int x) => new Int3(x, x, x);
/// <summary>
/// Sums two <see cref="Int3"/> values
/// </summary>
/// <param name="left">The first <see cref="Int3"/> value to sum</param>
/// <param name="right">The second <see cref="Int3"/> value to sum</param>
public static Int3 operator +(Int3 left, Int3 right) => throw new InvalidExecutionContextException($"{nameof(Int3)}.+");
/// <summary>
/// Divides two <see cref="Int3"/> values
/// </summary>
/// <param name="left">The first <see cref="Int3"/> value to divide</param>
/// <param name="right">The second <see cref="Int3"/> value to divide</param>
public static Int3 operator /(Int3 left, Int3 right) => throw new InvalidExecutionContextException($"{nameof(Int3)}./");
/// <summary>
/// Multiplies two <see cref="Int3"/> values
/// </summary>
/// <param name="left">The first <see cref="Int3"/> value to multiply</param>
/// <param name="right">The second <see cref="Int3"/> value to multiply</param>
public static Int3 operator *(Int3 left, Int3 right) => throw new InvalidExecutionContextException($"{nameof(Int3)}.*");
/// <summary>
/// Subtracts two <see cref="Int3"/> values
/// </summary>
/// <param name="left">The first <see cref="Int3"/> value to subtract</param>
/// <param name="right">The second <see cref="Int3"/> value to subtract</param>
public static Int3 operator -(Int3 left, Int3 right) => throw new InvalidExecutionContextException($"{nameof(Int3)}.-");
}
}
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+23
ファイルの表示
@@ -0,0 +1,23 @@
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that indicates the ids of a given GPU thread running a compute shader
/// </summary>
public readonly struct ThreadIds
{
/// <summary>
/// The X id of the current thread
/// </summary>
public readonly int X;
/// <summary>
/// The Y id of the current thread
/// </summary>
public readonly int Y;
/// <summary>
/// The Z id of the current thread
/// </summary>
public readonly int Z;
}
}
+171
ファイルの表示
@@ -0,0 +1,171 @@
using System.Runtime.InteropServices;
using ComputeSharp.Exceptions;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that maps the uint2 HLSL type
/// </summary>
[StructLayout(LayoutKind.Sequential, Size = sizeof(uint) * 2)]
public struct UInt2
{
/// <summary>
/// Gets an <see cref="UInt2"/> value with all components set to 0
/// </summary>
public static UInt2 Zero { get; } = 0;
/// <summary>
/// Gets an <see cref="UInt2"/> value with all components set to 1
/// </summary>
public static UInt2 One { get; } = 1;
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="X"/> component set to 1, and the others to 0
/// </summary>
public static UInt2 UnitX { get; } = new UInt2(1, 0);
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="Y"/> component set to 1, and the others to 0
/// </summary>
public static UInt2 UnitY { get; } = new UInt2(0, 1);
/// <summary>
/// Creates a new <see cref="UInt2"/> instance with the specified parameters
/// </summary>
/// <param name="x">The value to assign to the first vector component</param>
/// <param name="y">The value to assign to the second vector component</param>
public UInt2(uint x, uint y)
{
X = x;
Y = y;
}
/// <summary>
/// Gets or sets the value of the first vector component
/// </summary>
public uint X { get; set; }
/// <summary>
/// Gets or sets the value of the second vector component
/// </summary>
public uint Y { get; set; }
/// <summary>
/// Gets or sets the value of the first color component
/// </summary>
public uint R
{
get => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(R)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(R)}");
}
/// <summary>
/// Gets or sets the value of the second color component
/// </summary>
public uint G
{
get => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(G)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(G)}");
}
/// <summary>
/// Gets or sets a specific component in the current <see cref="UInt2"/> instance
/// </summary>
/// <param name="i">The index of the component to access</param>
public float this[int i]
{
get => throw new InvalidExecutionContextException($"{nameof(UInt2)}[int]");
set => throw new InvalidExecutionContextException($"{nameof(UInt2)}[int]");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="X"/> value for all components
/// </summary>
public UInt2 XX => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(XX)}");
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public UInt2 XY
{
get => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(XY)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(XY)}");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public UInt2 YX
{
get => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(YX)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(YX)}");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="Y"/> value for all components
/// </summary>
public UInt2 YY => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(YY)}");
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="R"/> value for all components
/// </summary>
public UInt2 RR => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(RR)}");
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="R"/> and <see cref="G"/> values
/// </summary>
public UInt2 RG
{
get => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(RG)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(RG)}");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="G"/> and <see cref="R"/> values
/// </summary>
public UInt2 GR
{
get => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(GR)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(GR)}");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="G"/> value for all components
/// </summary>
public UInt2 GG => throw new InvalidExecutionContextException($"{nameof(UInt2)}.{nameof(GG)}");
/// <summary>
/// Creates a new <see cref="UInt2"/> value with the same value for all its components
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt2"/> instance</param>
public static implicit operator UInt2(uint x) => new UInt2(x, x);
/// <summary>
/// Sums two <see cref="UInt2"/> values
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to sum</param>
/// <param name="right">The second <see cref="UInt2"/> value to sum</param>
public static UInt2 operator +(UInt2 left, UInt2 right) => throw new InvalidExecutionContextException($"{nameof(UInt2)}.+");
/// <summary>
/// Divides two <see cref="UInt2"/> values
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to divide</param>
/// <param name="right">The second <see cref="UInt2"/> value to divide</param>
public static UInt2 operator /(UInt2 left, UInt2 right) => throw new InvalidExecutionContextException($"{nameof(UInt2)}./");
/// <summary>
/// Multiplies two <see cref="UInt2"/> values
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to multiply</param>
/// <param name="right">The second <see cref="UInt2"/> value to multiply</param>
public static UInt2 operator *(UInt2 left, UInt2 right) => throw new InvalidExecutionContextException($"{nameof(UInt2)}.*");
/// <summary>
/// Subtracts two <see cref="UInt2"/> values
/// </summary>
/// <param name="left">The first <see cref="UInt2"/> value to subtract</param>
/// <param name="right">The second <see cref="UInt2"/> value to subtract</param>
public static UInt2 operator -(UInt2 left, UInt2 right) => throw new InvalidExecutionContextException($"{nameof(UInt2)}.-");
}
}
+592
ファイルの表示
@@ -0,0 +1,592 @@
using System.Runtime.InteropServices;
using ComputeSharp.Exceptions;
namespace ComputeSharp
{
/// <summary>
/// A <see langword="struct"/> that maps the uint3 HLSL type
/// </summary>
[StructLayout(LayoutKind.Sequential, Size = sizeof(uint) * 3)]
public struct UInt3
{
/// <summary>
/// Gets an <see cref="UInt3"/> value with all components set to 0
/// </summary>
public static UInt3 Zero { get; } = 0;
/// <summary>
/// Gets an <see cref="UInt3"/> value with all components set to 1
/// </summary>
public static UInt3 One { get; } = 1;
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="X"/> component set to 1, and the others to 0
/// </summary>
public static UInt3 UnitX { get; } = new UInt3(1, 0, 0);
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Y"/> component set to 1, and the others to 0
/// </summary>
public static UInt3 UnitY { get; } = new UInt3(0, 1, 0);
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Z"/> component set to 1, and the others to 0
/// </summary>
public static UInt3 UnitZ { get; } = new UInt3(0, 0, 1);
/// <summary>
/// Creates a new <see cref="UInt3"/> instance with the specified parameters
/// </summary>
/// <param name="x">The value to assign to the first vector component</param>
/// <param name="y">The value to assign to the second vector component</param>
/// <param name="z">The value to assign to the third vector component</param>
public UInt3(uint x, uint y, uint z)
{
X = x;
Y = y;
Z = z;
}
/// <summary>
/// Gets or sets the value of the first vector component
/// </summary>
public uint X { get; set; }
/// <summary>
/// Gets or sets the value of the second vector component
/// </summary>
public uint Y { get; set; }
/// <summary>
/// Gets or sets the value of the third vector component
/// </summary>
public uint Z { get; set; }
/// <summary>
/// Gets or sets the value of the first color component
/// </summary>
public uint R
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(R)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(R)}");
}
/// <summary>
/// Gets or sets the value of the second color component
/// </summary>
public uint G
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(G)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(G)}");
}
/// <summary>
/// Gets or sets the value of the third color component
/// </summary>
public uint B
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(B)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(B)}");
}
/// <summary>
/// Gets or sets a specific component in the current <see cref="UInt3"/> instance
/// </summary>
/// <param name="i">The index of the component to access</param>
public uint this[int i]
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}[int]");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}[int]");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="X"/> value for all components
/// </summary>
public UInt2 XX => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XX)}");
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public UInt2 XY
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XY)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XY)}");
}
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public UInt2 XZ
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XZ)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XZ)}");
}
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public UInt2 YX
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YX)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YX)}");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="Y"/> value for all components
/// </summary>
public UInt2 YY => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YY)}");
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public UInt2 YZ
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YZ)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YZ)}");
}
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public UInt2 ZX
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZX)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZX)}");
}
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public UInt2 ZY
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZY)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZY)}");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="Z"/> value for all components
/// </summary>
public UInt2 ZZ => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZZ)}");
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="R"/> value for all components
/// </summary>
public UInt2 RR => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RR)}");
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="R"/> and <see cref="G"/> values
/// </summary>
public UInt2 RG
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RG)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RG)}");
}
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="R"/> and <see cref="B"/> values
/// </summary>
public UInt2 RB
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RB)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RB)}");
}
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="G"/> and <see cref="R"/> values
/// </summary>
public UInt2 GR
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GR)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GR)}");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="G"/> value for all components
/// </summary>
public UInt2 GG => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GG)}");
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="G"/> and <see cref="B"/> values
/// </summary>
public UInt2 GB
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GB)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GB)}");
}
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="B"/> and <see cref="R"/> values
/// </summary>
public UInt2 BR
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BR)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BR)}");
}
/// <summary>
/// Gets or sets an <see cref="UInt2"/> value with the <see cref="B"/> and <see cref="G"/> values
/// </summary>
public UInt2 BG
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BG)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BG)}");
}
/// <summary>
/// Gets an <see cref="UInt2"/> value with the <see cref="B"/> value for all components
/// </summary>
public UInt2 BB => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BB)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="X"/> value for all components
/// </summary>
public UInt2 XXX => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XXX)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="X"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public UInt2 XXY => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XXY)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="X"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public UInt2 XXZ => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XXZ)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public UInt2 XYX => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XYX)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="Y"/> values
/// </summary>
public UInt2 XYY => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XYY)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="X"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public UInt2 XYZ
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XYZ)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XYZ)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public UInt2 XZX => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XZX)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public UInt2 XZY
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XZY)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XZY)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="X"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public UInt2 XZZ => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(XZZ)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="X"/> values
/// </summary>
public UInt2 YXX => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YXX)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public UInt2 YXY => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YXY)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="Y"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public UInt2 YXZ
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YXZ)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YXZ)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Y"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public UInt2 YYX => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YYX)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Y"/> value for all components
/// </summary>
public UInt2 YYY => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YYY)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Y"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public UInt2 YYZ => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YYZ)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public UInt2 YZX
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YZX)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YZX)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public UInt2 YZY => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YZY)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Y"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public UInt2 YZZ => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(YZZ)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="Z"/> values
/// </summary>
public UInt2 ZXX => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZXX)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="Z"/>, <see cref="X"/> and <see cref="Y"/> values
/// </summary>
public UInt2 ZXY
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZXY)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZXY)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Z"/>, <see cref="X"/> and <see cref="Z"/> values
/// </summary>
public UInt2 ZXZ => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZXZ)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="X"/> values
/// </summary>
public UInt2 ZYX
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZYX)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZYX)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="Y"/> values
/// </summary>
public UInt2 ZYY => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZYY)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Z"/>, <see cref="Y"/> and <see cref="Z"/> values
/// </summary>
public UInt2 ZYZ => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZYZ)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="X"/> values
/// </summary>
public UInt2 ZZX => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZZX)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Z"/>, <see cref="Z"/> and <see cref="Y"/> values
/// </summary>
public UInt2 ZZY => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZZY)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="Z"/> value for all components
/// </summary>
public UInt2 ZZZ => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(ZZZ)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="R"/> value for all components
/// </summary>
public UInt2 RRR => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RRR)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="R"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public UInt2 RRG => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RRG)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="R"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public UInt2 RRB => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RRB)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public UInt2 RGR => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RGR)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="G"/> values
/// </summary>
public UInt2 RGG => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RGG)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="R"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public UInt2 RGB
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RGB)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RGB)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public UInt2 RBR => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RBR)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public UInt2 RBG
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RBG)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RBG)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="R"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public UInt2 RBB => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(RBB)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="R"/> values
/// </summary>
public UInt2 GRR => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GRR)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public UInt2 GRG => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GRG)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="G"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public UInt2 GRB
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GRB)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GRB)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="G"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public UInt2 GGR => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GGR)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="G"/> value for all components
/// </summary>
public UInt2 GGG => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GGG)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="G"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public UInt2 GGB => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GGB)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public UInt2 GBR
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GBR)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GBR)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public UInt2 GBG => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GBG)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="G"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public UInt2 GBB => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(GBB)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="B"/> values
/// </summary>
public UInt2 BRR => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BRR)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="B"/>, <see cref="R"/> and <see cref="G"/> values
/// </summary>
public UInt2 BRG
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BRG)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BRG)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="B"/>, <see cref="R"/> and <see cref="B"/> values
/// </summary>
public UInt2 BRB => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BRB)}");
/// <summary>
/// Gets or sets an <see cref="UInt3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="R"/> values
/// </summary>
public UInt2 BGR
{
get => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BGR)}");
set => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BGR)}");
}
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="G"/> values
/// </summary>
public UInt2 BGG => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BGG)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="B"/>, <see cref="G"/> and <see cref="B"/> values
/// </summary>
public UInt2 BGB => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BGB)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="R"/> values
/// </summary>
public UInt2 BBR => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BBR)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="B"/>, <see cref="B"/> and <see cref="G"/> values
/// </summary>
public UInt2 BBG => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BBG)}");
/// <summary>
/// Gets an <see cref="UInt3"/> value with the <see cref="B"/> value for all components
/// </summary>
public UInt2 BBB => throw new InvalidExecutionContextException($"{nameof(UInt3)}.{nameof(BBB)}");
/// <summary>
/// Creates a new <see cref="UInt3"/> value with the same value for all its components
/// </summary>
/// <param name="x">The value to use for the components of the new <see cref="UInt3"/> instance</param>
public static implicit operator UInt3(uint x) => new UInt3(x, x, x);
/// <summary>
/// Sums two <see cref="UInt3"/> values
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to sum</param>
/// <param name="right">The second <see cref="UInt3"/> value to sum</param>
public static UInt3 operator +(UInt3 left, UInt3 right) => throw new InvalidExecutionContextException($"{nameof(UInt3)}.+");
/// <summary>
/// Divides two <see cref="UInt3"/> values
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to divide</param>
/// <param name="right">The second <see cref="UInt3"/> value to divide</param>
public static UInt3 operator /(UInt3 left, UInt3 right) => throw new InvalidExecutionContextException($"{nameof(UInt3)}./");
/// <summary>
/// Multiplies two <see cref="UInt3"/> values
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to multiply</param>
/// <param name="right">The second <see cref="UInt3"/> value to multiply</param>
public static UInt3 operator *(UInt3 left, UInt3 right) => throw new InvalidExecutionContextException($"{nameof(UInt3)}.*");
/// <summary>
/// Subtracts two <see cref="UInt3"/> values
/// </summary>
/// <param name="left">The first <see cref="UInt3"/> value to subtract</param>
/// <param name="right">The second <see cref="UInt3"/> value to subtract</param>
public static UInt3 operator -(UInt3 left, UInt3 right) => throw new InvalidExecutionContextException($"{nameof(UInt3)}.-");
}
}
ファイル差分が大きすぎるため表示されません。 差分を読み込み
+10
ファイルの表示
@@ -30,6 +30,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Benchmark", ".
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.BokehBlur", "..\samples\ComputeSharp.BokehBlur\ComputeSharp.BokehBlur.csproj", "{524CC5DD-1DEE-4A30-9515-AB90965E5207}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.Core", "ComputeSharp.Core\ComputeSharp.Core.csproj", "{9F9581FB-6EF7-418E-BFA5-0EFED874E980}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -102,6 +104,14 @@ Global
{524CC5DD-1DEE-4A30-9515-AB90965E5207}.Release|Any CPU.Build.0 = Release|Any CPU
{524CC5DD-1DEE-4A30-9515-AB90965E5207}.Release|x64.ActiveCfg = Release|Any CPU
{524CC5DD-1DEE-4A30-9515-AB90965E5207}.Release|x64.Build.0 = Release|Any CPU
{9F9581FB-6EF7-418E-BFA5-0EFED874E980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F9581FB-6EF7-418E-BFA5-0EFED874E980}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F9581FB-6EF7-418E-BFA5-0EFED874E980}.Debug|x64.ActiveCfg = Debug|Any CPU
{9F9581FB-6EF7-418E-BFA5-0EFED874E980}.Debug|x64.Build.0 = Debug|Any CPU
{9F9581FB-6EF7-418E-BFA5-0EFED874E980}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F9581FB-6EF7-418E-BFA5-0EFED874E980}.Release|Any CPU.Build.0 = Release|Any CPU
{9F9581FB-6EF7-418E-BFA5-0EFED874E980}.Release|x64.ActiveCfg = Release|Any CPU
{9F9581FB-6EF7-418E-BFA5-0EFED874E980}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE