brutal/Brutal.Numerics/Vector/byte3/byte3.swizzle.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

400 lines
9.1 KiB
C#

// <auto-generated /> - edit Vector.swizzle.tt to modify
#nullable enable
namespace Brutal.Numerics;
public partial struct byte3
{
/// <summary>
/// Swizzle readonly getter/setter for the X and Y components of the vector.
/// </summary>
[XmlIgnore]
public byte2 XY
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(X, Y);
set
{
X = value.X;
Y = value.Y;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the X and Z components of the vector.
/// </summary>
[XmlIgnore]
public byte2 XZ
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(X, Z);
set
{
X = value.X;
Z = value.Y;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Y and X components of the vector.
/// </summary>
[XmlIgnore]
public byte2 YX
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Y, X);
set
{
Y = value.X;
X = value.Y;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Y and Z components of the vector.
/// </summary>
[XmlIgnore]
public byte2 YZ
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Y, Z);
set
{
Y = value.X;
Z = value.Y;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Z and X components of the vector.
/// </summary>
[XmlIgnore]
public byte2 ZX
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Z, X);
set
{
Z = value.X;
X = value.Y;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Z and Y components of the vector.
/// </summary>
[XmlIgnore]
public byte2 ZY
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Z, Y);
set
{
Z = value.X;
Y = value.Y;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the X, Y and Z components of the vector.
/// </summary>
[XmlIgnore]
public byte3 XYZ
{
readonly get => this;
set => this = value;
}
/// <summary>
/// Swizzle readonly getter/setter for the X, Z and Y components of the vector.
/// </summary>
[XmlIgnore]
public byte3 XZY
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(X, Z, Y);
set
{
X = value.X;
Z = value.Y;
Y = value.Z;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Y, X and Z components of the vector.
/// </summary>
[XmlIgnore]
public byte3 YXZ
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Y, X, Z);
set
{
Y = value.X;
X = value.Y;
Z = value.Z;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Y, Z and X components of the vector.
/// </summary>
[XmlIgnore]
public byte3 YZX
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Y, Z, X);
set
{
Y = value.X;
Z = value.Y;
X = value.Z;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Z, X and Y components of the vector.
/// </summary>
[XmlIgnore]
public byte3 ZXY
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Z, X, Y);
set
{
Z = value.X;
X = value.Y;
Y = value.Z;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Z, Y and X components of the vector.
/// </summary>
[XmlIgnore]
public byte3 ZYX
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Z, Y, X);
set
{
Z = value.X;
Y = value.Y;
X = value.Z;
}
}
}
public partial struct byte3
{
/// <summary>
/// The Red component of the vector (synonym for X).
/// </summary>
[XmlIgnore]
public byte R
{
readonly get => X;
set => X = value;
}
/// <summary>
/// The Green component of the vector (synonym for Y).
/// </summary>
[XmlIgnore]
public byte G
{
readonly get => Y;
set => Y = value;
}
/// <summary>
/// The Blue component of the vector (synonym for Z).
/// </summary>
[XmlIgnore]
public byte B
{
readonly get => Z;
set => Z = value;
}
/// <summary>
/// Swizzle readonly getter/setter for the Red and Green components of the vector.
/// </summary>
[XmlIgnore]
public byte2 RG
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(R, G);
set
{
R = value.R;
G = value.G;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Red and Blue components of the vector.
/// </summary>
[XmlIgnore]
public byte2 RB
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(R, B);
set
{
R = value.R;
B = value.G;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Green and Red components of the vector.
/// </summary>
[XmlIgnore]
public byte2 GR
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(G, R);
set
{
G = value.R;
R = value.G;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Green and Blue components of the vector.
/// </summary>
[XmlIgnore]
public byte2 GB
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(G, B);
set
{
G = value.R;
B = value.G;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Blue and Red components of the vector.
/// </summary>
[XmlIgnore]
public byte2 BR
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(B, R);
set
{
B = value.R;
R = value.G;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Blue and Green components of the vector.
/// </summary>
[XmlIgnore]
public byte2 BG
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(B, G);
set
{
B = value.R;
G = value.G;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Red, Green, and Blue components of the vector.
/// </summary>
[XmlIgnore]
public byte3 RGB
{
readonly get => this;
set => this = value;
}
/// <summary>
/// Swizzle readonly getter/setter for the Red, Blue, and Green components of the vector.
/// </summary>
[XmlIgnore]
public byte3 RBG
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(X, Z, Y);
set
{
R = value.R;
B = value.G;
G = value.B;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Green, Red, and Blue components of the vector.
/// </summary>
[XmlIgnore]
public byte3 GRB
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Y, X, Z);
set
{
G = value.R;
R = value.G;
B = value.B;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Green, Blue, and Red components of the vector.
/// </summary>
[XmlIgnore]
public byte3 GBR
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Y, Z, X);
set
{
G = value.R;
B = value.G;
R = value.B;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Blue, Red, and Green components of the vector.
/// </summary>
[XmlIgnore]
public byte3 BRG
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Z, X, Y);
set
{
B = value.R;
R = value.G;
G = value.B;
}
}
/// <summary>
/// Swizzle readonly getter/setter for the Blue, Green, and Red components of the vector.
/// </summary>
[XmlIgnore]
public byte3 BGR
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Z, Y, X);
set
{
B = value.R;
G = value.G;
R = value.B;
}
}
}