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