Struct XMXDecN4
A 4D vector for storing signed, normalized values as 10 bit signed x-,y-, and z- components and an unsigned, normalized value as 2 bit unsigned w-component.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath.PackedVector
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMXDecN4 : IEquatable<XMXDecN4>
Constructors
| Edit this page View SourceXMXDecN4(float, float, float, float)
Initializes a new instance of the XMXDecN4 struct.
Declaration
public XMXDecN4(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. |
XMXDecN4(float[])
Initializes a new instance of the XMXDecN4 struct.
Declaration
public XMXDecN4(float[] array)
Parameters
Type | Name | Description |
---|---|---|
float[] | array | The components of the vector. |
XMXDecN4(uint)
Initializes a new instance of the XMXDecN4 struct.
Declaration
public XMXDecN4(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
public uint W { get; set; }
Property Value
Type | Description |
---|---|
uint |
X
Gets or sets the x-coordinate of the vector.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
int |
Y
Gets or sets the y-coordinate of the vector.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
int |
Z
Gets or sets the z-coordinate of the vector.
Declaration
public int Z { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceEquals(XMXDecN4)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(XMXDecN4 other)
Parameters
Type | Name | Description |
---|---|---|
XMXDecN4 | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceFromPacked(uint)
Converts a packed value to a XMXDecN4.
Declaration
public static XMXDecN4 FromPacked(uint value)
Parameters
Type | Name | Description |
---|---|---|
uint | value | A packed value. |
Returns
Type | Description |
---|---|
XMXDecN4 | A XMXDecN4. |
FromVector(XMVector)
Declaration
public static XMXDecN4 FromVector(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMXDecN4 | A XMXDecN4. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
| Edit this page View SourceToPacked()
Converts a XMXDecN4 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 ==(XMXDecN4, XMXDecN4)
Compares two XMXDecN4 objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(XMXDecN4 left, XMXDecN4 right)
Parameters
Type | Name | Description |
---|---|---|
XMXDecN4 | left | The left XMXDecN4 to compare. |
XMXDecN4 | right | The right XMXDecN4 to compare. |
Returns
Type | Description |
---|---|
bool |
implicit operator XMVector(XMXDecN4)
Declaration
public static implicit operator XMVector(XMXDecN4 value)
Parameters
Type | Name | Description |
---|---|---|
XMXDecN4 | value | A XMXDecN4. |
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
implicit operator uint(XMXDecN4)
Converts a XMXDecN4 to a packed value.
Declaration
public static implicit operator uint(XMXDecN4 value)
Parameters
Type | Name | Description |
---|---|---|
XMXDecN4 | value | A XMXDecN4. |
Returns
Type | Description |
---|---|
uint | A packed value. |
implicit operator XMXDecN4(XMVector)
Declaration
public static implicit operator XMXDecN4(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMXDecN4 | A XMXDecN4. |
implicit operator XMXDecN4(uint)
Converts a packed value to a XMXDecN4.
Declaration
public static implicit operator XMXDecN4(uint value)
Parameters
Type | Name | Description |
---|---|---|
uint | value | A packed value. |
Returns
Type | Description |
---|---|
XMXDecN4 | A XMXDecN4. |
operator !=(XMXDecN4, XMXDecN4)
Compares two XMXDecN4 objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(XMXDecN4 left, XMXDecN4 right)
Parameters
Type | Name | Description |
---|---|---|
XMXDecN4 | left | The left XMXDecN4 to compare. |
XMXDecN4 | right | The right XMXDecN4 to compare. |
Returns
Type | Description |
---|---|
bool |