Search Results for

    Show / Hide Table of Contents

    Class 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]

    Inheritance
    System.Object
    FloatR10G10B10A2
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public sealed class FloatR10G10B10A2 : ValueType

    Constructors

    FloatR10G10B10A2(Float3, Single)

    Initializes a new instance of the FloatR10G10B10A2 structure.

    Declaration
    public FloatR10G10B10A2(Float3 value, float w = 0F)
    Parameters
    Float3 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(Float4)

    Initializes a new instance of the FloatR10G10B10A2 structure.

    Declaration
    public FloatR10G10B10A2(Float4 value)
    Parameters
    Float4 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 float A { get; }
    Property Value
    System.Single

    B

    Gets the B component.

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

    G

    Gets the G component.

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

    R

    Gets the R component.

    Declaration
    public 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; }
    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.

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    System.Int32

    A 32-bit signed integer hash code.

    ToFloat3()

    Unpacks vector to Float3.

    Declaration
    public Float3 ToFloat3()
    Returns
    Float3

    Float3 value

    ToFloat4()

    Unpacks vector to Float4.

    Declaration
    public Float4 ToFloat4()
    Returns
    Float4

    Float4 value

    ToString()

    Returns a System.String that represents this instance.

    Declaration
    public override string ToString()
    Returns
    System.String

    A System.String that represents this instance.

    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(Float4 to FloatR10G10B10A2)

    Performs an explicit conversion from Float4 to FloatR10G10B10A2.

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

    The value to be converted.

    Returns
    FloatR10G10B10A2

    The converted value.

    Implicit(FloatR10G10B10A2 to Float4)

    Performs an implicit conversion from FloatR10G10B10A2 to Float4.

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

    The value to be converted.

    Returns
    Float4

    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.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat