Vixen
02b45cc4
csharp
public readonly struct Int4

A four-component integer vector: GPU int4 constants, bone indices, and the (x, y, width, height) quadruples the RHI passes around.

No guide page documents this yet — the page shows what the code says about itself.

Fields and properties (9)

  • public readonly int X

    The X component.

  • public readonly int Y

    The Y component.

  • public readonly int Z

    The Z component.

  • public readonly int W

    The W component.

  • public static Int4 Zero

    All components zero.

  • public static Int4 One

    All components one.

  • public int this[int index]

    The component at .

  • public Int3 Xyz

    The X, Y and Z components.

  • public Int2 Xy

    The X and Y components.

Methods (22)

  • public Int4(int x, int y, int z, int w)

    Builds a vector from its components.

  • public Int4(int value)

    Builds a vector with every component set to .

  • public static Int4 Min(Int4 left, Int4 right)

    The component-wise minimum.

  • public static Int4 Max(Int4 left, Int4 right)

    The component-wise maximum.

  • public static Int4 Clamp(Int4 value, Int4 min, Int4 max)

    Constrains each component to the matching interval.

  • public static Int4 operator +(Int4 left, Int4 right)

    Adds two vectors.

  • public static Int4 operator -(Int4 left, Int4 right)

    Subtracts one vector from another.

  • public static Int4 operator -(Int4 value)

    Negates a vector.

  • public static Int4 operator *(Int4 left, Int4 right)

    Multiplies component by component.

  • public static Int4 operator *(Int4 value, int scale)

    Scales a vector.

  • public static Int4 operator *(int scale, Int4 value)

    Scales a vector.

  • public static Int4 operator /(Int4 left, Int4 right)

    Divides component by component, truncating toward zero.

  • public static Int4 operator /(Int4 value, int divisor)

    Divides by a scalar, truncating toward zero.

  • public static bool operator ==(Int4 left, Int4 right)

    Component-wise equality.

  • public static bool operator !=(Int4 left, Int4 right)

    The negation of op_Equality.

  • public static implicit operator Vector4(Int4 value)

    Widens to a float vector, which is always exact for these magnitudes.

  • public void Deconstruct(out int x, out int y, out int z, out int w)

    Splits the vector into its components.

  • public bool Equals(Int4 other)

    Indicates whether the current object is equal to another object of the same type.

  • public override bool Equals(object? obj)

    Indicates whether this instance and a specified object are equal.

  • public override int GetHashCode()

    Returns the hash code for this instance.

  • public override string ToString()

    Returns the fully qualified type name of this instance.

  • public string ToString(string? format, IFormatProvider? formatProvider)

    Formats the value of the current instance using the specified format.

Used by (8)

  • EffectLoaderVixen.Shaders
  • ShaderConstantsVixen.Shaders
  • SkinnedClusterTestsVixen.Rendering.Tests
  • TypeRegistrationVixen.Core.Mathematics
  • VectorTestsVixen.Core.Mathematics.Tests
  • VertexInfluenceVixen.Rendering.VirtualGeometry
  • Vixen_Core_Mathematics_Int4SerializerVixen.Core.Mathematics
  • SkinnedPageTestsVixen.Editor.Assets.Tests