Struct XMUNibble4
A 4D vector with four unsigned 4-bit integer components.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.DXMath.PackedVector
Assembly: JeremyAnsel.DirectX.DXMath.dll
Syntax
public struct XMUNibble4 : IEquatable<XMUNibble4>
Constructors
| Edit this page View SourceXMUNibble4(byte, byte, byte, byte)
Initializes a new instance of the XMUNibble4 struct.
Declaration
public XMUNibble4(byte x, byte y, byte z, byte w)
Parameters
Type | Name | Description |
---|---|---|
byte | x | The x-coordinate of the vector. |
byte | y | The y-coordinate of the vector. |
byte | z | The z-coordinate of the vector. |
byte | w | The w-coordinate of the vector. |
XMUNibble4(byte[])
Initializes a new instance of the XMUNibble4 struct.
Declaration
public XMUNibble4(byte[] array)
Parameters
Type | Name | Description |
---|---|---|
byte[] | array | The components of the vector. |
XMUNibble4(float, float, float, float)
Initializes a new instance of the XMUNibble4 struct.
Declaration
public XMUNibble4(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. |
XMUNibble4(float[])
Initializes a new instance of the XMUNibble4 struct.
Declaration
public XMUNibble4(float[] array)
Parameters
Type | Name | Description |
---|---|---|
float[] | array | The components of the vector. |
XMUNibble4(ushort)
Initializes a new instance of the XMUNibble4 struct.
Declaration
public XMUNibble4(ushort packed)
Parameters
Type | Name | Description |
---|---|---|
ushort | packed | A packed value representing the vector. |
Properties
| Edit this page View SourceW
Gets or sets the w-coordinate of the vector.
Declaration
public byte W { get; set; }
Property Value
Type | Description |
---|---|
byte |
X
Gets or sets the x-coordinate of the vector.
Declaration
public byte X { get; set; }
Property Value
Type | Description |
---|---|
byte |
Y
Gets or sets the y-coordinate of the vector.
Declaration
public byte Y { get; set; }
Property Value
Type | Description |
---|---|
byte |
Z
Gets or sets the z-coordinate of the vector.
Declaration
public byte Z { get; set; }
Property Value
Type | Description |
---|---|
byte |
Methods
| Edit this page View SourceEquals(XMUNibble4)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(XMUNibble4 other)
Parameters
Type | Name | Description |
---|---|---|
XMUNibble4 | 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(ushort)
Converts a packed value to a XMUNibble4.
Declaration
public static XMUNibble4 FromPacked(ushort value)
Parameters
Type | Name | Description |
---|---|---|
ushort | value | A packed value. |
Returns
Type | Description |
---|---|
XMUNibble4 | A XMUNibble4. |
FromVector(XMVector)
Converts a XMVector to a XMUNibble4.
Declaration
public static XMUNibble4 FromVector(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMUNibble4 | A XMUNibble4. |
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 XMUNibble4 to a packed value.
Declaration
public ushort ToPacked()
Returns
Type | Description |
---|---|
ushort | A packed value. |
ToVector()
Converts a XMUNibble4 to a XMVector.
Declaration
public XMVector ToVector()
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
Operators
| Edit this page View Sourceoperator ==(XMUNibble4, XMUNibble4)
Compares two XMUNibble4 objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(XMUNibble4 left, XMUNibble4 right)
Parameters
Type | Name | Description |
---|---|---|
XMUNibble4 | left | The left XMUNibble4 to compare. |
XMUNibble4 | right | The right XMUNibble4 to compare. |
Returns
Type | Description |
---|---|
bool |
implicit operator XMVector(XMUNibble4)
Converts a XMUNibble4 to a XMVector.
Declaration
public static implicit operator XMVector(XMUNibble4 value)
Parameters
Type | Name | Description |
---|---|---|
XMUNibble4 | value | A XMUNibble4. |
Returns
Type | Description |
---|---|
XMVector | A XMVector. |
implicit operator ushort(XMUNibble4)
Converts a XMUNibble4 to a packed value.
Declaration
public static implicit operator ushort(XMUNibble4 value)
Parameters
Type | Name | Description |
---|---|---|
XMUNibble4 | value | A XMUNibble4. |
Returns
Type | Description |
---|---|
ushort | A packed value. |
implicit operator XMUNibble4(XMVector)
Converts a XMVector to a XMUNibble4.
Declaration
public static implicit operator XMUNibble4(XMVector value)
Parameters
Type | Name | Description |
---|---|---|
XMVector | value | A XMVector. |
Returns
Type | Description |
---|---|
XMUNibble4 | A XMUNibble4. |
implicit operator XMUNibble4(ushort)
Converts a packed value to a XMUNibble4.
Declaration
public static implicit operator XMUNibble4(ushort value)
Parameters
Type | Name | Description |
---|---|---|
ushort | value | A packed value. |
Returns
Type | Description |
---|---|
XMUNibble4 | A XMUNibble4. |
operator !=(XMUNibble4, XMUNibble4)
Compares two XMUNibble4 objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(XMUNibble4 left, XMUNibble4 right)
Parameters
Type | Name | Description |
---|---|---|
XMUNibble4 | left | The left XMUNibble4 to compare. |
XMUNibble4 | right | The right XMUNibble4 to compare. |
Returns
Type | Description |
---|---|
bool |