Search Results for

    Show / Hide Table of Contents

    Struct FloatR10G10B10A2

    Packed vector, layout: R:10 bytes, G:10 bytes, B:10 bytes, A:2 bytes, all values are stored as floats in range [0;1]

    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public struct FloatR10G10B10A2

    Constructors

    FloatR10G10B10A2(Vector3, Single)

    Initializes a new instance of the FloatR10G10B10A2 structure.

    Declaration
    public FloatR10G10B10A2(Vector3 value, float w = 0F)
    Parameters
    Vector3 value

    The floating point value that should be stored in 10 bit format.

    System.Single w

    The floating point value that should be stored in alpha component (2 bit format).

    FloatR10G10B10A2(Vector4)

    Initializes a new instance of the FloatR10G10B10A2 structure.

    Declaration
    public FloatR10G10B10A2(Vector4 value)
    Parameters
    Vector4 value

    The floating point value that should be stored in 10 bit format.

    FloatR10G10B10A2(Single, Single, Single, Single)

    Initializes a new instance of the FloatR10G10B10A2 structure.

    Declaration
    public FloatR10G10B10A2(float x, float y, float z, float w)
    Parameters
    System.Single x

    The floating point value that should be stored in R component (10 bit format).

    System.Single y

    The floating point value that should be stored in G component (10 bit format).

    System.Single z

    The floating point value that should be stored in B component (10 bit format).

    System.Single w

    The floating point value that should be stored in A component (2 bit format).

    Properties

    A

    Gets the A component.

    Declaration
    public readonly float A { get; }
    Property Value
    System.Single

    B

    Gets the B component.

    Declaration
    public readonly float B { get; }
    Property Value
    System.Single

    G

    Gets the G component.

    Declaration
    public readonly float G { get; }
    Property Value
    System.Single

    R

    Gets the R component.

    Declaration
    public readonly float R { get; }
    Property Value
    System.Single

    RawValue

    Gets or sets the raw 32 bit value used to back this vector.

    Declaration
    public uint RawValue { get; set; }
    Property Value
    System.UInt32

    Methods

    Equals(FloatR10G10B10A2)

    Returns a value that indicates whether the current instance is equal to the specified object.

    Declaration
    public bool Equals(FloatR10G10B10A2 other)
    Parameters
    FloatR10G10B10A2 other

    Object to make the comparison with.

    Returns
    System.Boolean

    true if the current instance is equal to the specified object; false otherwise.

    Equals(ref FloatR10G10B10A2, ref FloatR10G10B10A2)

    Determines whether the specified object instances are considered equal.

    Declaration
    public static bool Equals(ref FloatR10G10B10A2 value1, ref FloatR10G10B10A2 value2)
    Parameters
    FloatR10G10B10A2 value1

    FloatR10G10B10A2 value2

    Returns
    System.Boolean

    true if value1 is the same instance as value2 or if both are null references or if value1.Equals(value2) returns true; otherwise, false.

    Equals(Object)

    Returns a value that indicates whether the current instance is equal to a specified object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    System.Object obj

    Object to make the comparison with.

    Returns
    System.Boolean

    true if the current instance is equal to the specified object; false otherwise.

    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    System.Int32

    A 32-bit signed integer hash code.

    Overrides
    System.ValueType.GetHashCode()

    ToString()

    Returns a System.String that represents this instance.

    Declaration
    public override string ToString()
    Returns
    System.String

    A System.String that represents this instance.

    Overrides
    System.ValueType.ToString()

    ToVector3()

    Unpacks vector to Vector3.

    Declaration
    public Vector3 ToVector3()
    Returns
    Vector3

    Vector3 value

    ToVector4()

    Unpacks vector to Vector4.

    Declaration
    public Vector4 ToVector4()
    Returns
    Vector4

    Vector4 value

    Operators

    Equality(FloatR10G10B10A2, FloatR10G10B10A2)

    Tests for equality between two objects.

    Declaration
    public static bool operator ==(FloatR10G10B10A2 left, FloatR10G10B10A2 right)
    Parameters
    FloatR10G10B10A2 left

    The first value to compare.

    FloatR10G10B10A2 right

    The second value to compare.

    Returns
    System.Boolean

    true if left has the same value as right; otherwise, false.

    Explicit(Vector4 to FloatR10G10B10A2)

    Performs an explicit conversion from Vector4 to FloatR10G10B10A2.

    Declaration
    public static explicit operator FloatR10G10B10A2(Vector4 value)
    Parameters
    Vector4 value

    The value to be converted.

    Returns
    FloatR10G10B10A2

    The converted value.

    Implicit(FloatR10G10B10A2 to Vector4)

    Performs an implicit conversion from FloatR10G10B10A2 to Vector4.

    Declaration
    public static implicit operator Vector4(FloatR10G10B10A2 value)
    Parameters
    FloatR10G10B10A2 value

    The value to be converted.

    Returns
    Vector4

    The converted value.

    Inequality(FloatR10G10B10A2, FloatR10G10B10A2)

    Tests for inequality between two objects.

    Declaration
    public static bool operator !=(FloatR10G10B10A2 left, FloatR10G10B10A2 right)
    Parameters
    FloatR10G10B10A2 left

    The first value to compare.

    FloatR10G10B10A2 right

    The second value to compare.

    Returns
    System.Boolean

    true if left has a different value than right; otherwise, false.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2021 Wojciech Figat