Struct XMDecN4
A 4D vector for storing signed, normalized values as 10 bit signed x-,y-, and z- components and a 2 bit signed w-component.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath.PackedVector
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMDecN4 : IEquatable<XMDecN4>
Constructors
| Edit this page View SourceXMDecN4(ReadOnlySpan<float>)
Initializes a new instance of the XMDecN4 struct.
Declaration
public XMDecN4(ReadOnlySpan<float> array)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<float> | array | The components of the vector. |
XMDecN4(float, float, float, float)
Initializes a new instance of the XMDecN4 struct.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "x", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "y", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "z", Justification = "Reviewed")]
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "w", Justification = "Reviewed")]
public XMDecN4(float x, float y, float z, float w)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The x-coordinate of the vector. |
| float | y | The y-coordinate of the vector. |
| float | z | The z-coordinate of the vector. |
| float | w | The w-coordinate of the vector. |
XMDecN4(float[])
Initializes a new instance of the XMDecN4 struct.
Declaration
public XMDecN4(float[] array)
Parameters
| Type | Name | Description |
|---|---|---|
| float[] | array | The components of the vector. |
XMDecN4(uint)
Initializes a new instance of the XMDecN4 struct.
Declaration
public XMDecN4(uint packed)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | packed | A packed value representing the vector. |
Properties
| Edit this page View SourceW
Gets or sets the w-coordinate of the vector.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "W", Justification = "Reviewed")]
public int W { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
X
Gets or sets the x-coordinate of the vector.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "X", Justification = "Reviewed")]
public int X { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Y
Gets or sets the y-coordinate of the vector.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Y", Justification = "Reviewed")]
public int Y { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Z
Gets or sets the z-coordinate of the vector.
Declaration
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Z", Justification = "Reviewed")]
public int Z { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
| Edit this page View SourceEquals(XMDecN4)
Declaration
public readonly bool Equals(XMDecN4 other)
Parameters
| Type | Name | Description |
|---|---|---|
| XMDecN4 | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceFromPacked(uint)
Converts a packed value to a XMDecN4.
Declaration
public static XMDecN4 FromPacked(uint value)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | value | A packed value. |
Returns
| Type | Description |
|---|---|
| XMDecN4 | A XMDecN4. |
FromVector(XMVector)
Declaration
public static XMDecN4 FromVector(XMVector value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | value | A XMVector. |
Returns
| Type | Description |
|---|---|
| XMDecN4 | A XMDecN4. |
GetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
| Edit this page View SourceToPacked()
Converts a XMDecN4 to a packed value.
Declaration
public uint ToPacked()
Returns
| Type | Description |
|---|---|
| uint | A packed value. |
ToVector()
Declaration
public XMVector ToVector()
Returns
| Type | Description |
|---|---|
| XMVector | A XMVector. |
Operators
| Edit this page View Sourceoperator ==(XMDecN4, XMDecN4)
Declaration
public static bool operator ==(XMDecN4 left, XMDecN4 right)
Parameters
| Type | Name | Description |
|---|---|---|
| XMDecN4 | left | |
| XMDecN4 | right |
Returns
| Type | Description |
|---|---|
| bool |
implicit operator XMVector(XMDecN4)
Declaration
[SuppressMessage("Usage", "CA2225:Les surcharges d'opérateur offrent d'autres méthodes nommées", Justification = "Reviewed.")]
public static implicit operator XMVector(XMDecN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMDecN4 | value | A XMDecN4. |
Returns
| Type | Description |
|---|---|
| XMVector | A XMVector. |
implicit operator uint(XMDecN4)
Converts a XMDecN4 to a packed value.
Declaration
[SuppressMessage("Usage", "CA2225:Les surcharges d'opérateur offrent d'autres méthodes nommées", Justification = "Reviewed.")]
public static implicit operator uint(XMDecN4 value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMDecN4 | value | A XMDecN4. |
Returns
| Type | Description |
|---|---|
| uint | A packed value. |
implicit operator XMDecN4(XMVector)
Declaration
[SuppressMessage("Usage", "CA2225:Les surcharges d'opérateur offrent d'autres méthodes nommées", Justification = "Reviewed.")]
public static implicit operator XMDecN4(XMVector value)
Parameters
| Type | Name | Description |
|---|---|---|
| XMVector | value | A XMVector. |
Returns
| Type | Description |
|---|---|
| XMDecN4 | A XMDecN4. |
implicit operator XMDecN4(uint)
Converts a packed value to a XMDecN4.
Declaration
[SuppressMessage("Usage", "CA2225:Les surcharges d'opérateur offrent d'autres méthodes nommées", Justification = "Reviewed.")]
public static implicit operator XMDecN4(uint value)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | value | A packed value. |
Returns
| Type | Description |
|---|---|
| XMDecN4 | A XMDecN4. |
operator !=(XMDecN4, XMDecN4)
Declaration
public static bool operator !=(XMDecN4 left, XMDecN4 right)
Parameters
| Type | Name | Description |
|---|---|---|
| XMDecN4 | left | |
| XMDecN4 | right |
Returns
| Type | Description |
|---|---|
| bool |