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
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
|
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
|
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
|
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
System.Int32
A 32-bit signed integer hash code. |
ToFloat3()
ToFloat4()
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
|
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
|