Describes a 2D vector consisting of 16-bit unsigned integer components.
If you are programming in C++, you can use the constructors and operator methods of this structure.
Note See DirectXMath Library Type Equivalences for information about equivalent D3DDECLTYPE, D3DFORMAT, and DXGI_FORMAT objects.
struct XMUSHORT2
The fields in the XMUSHORT2 structure are declared as follows:
struct XMUSHORT2
{
union
{
struct
{
uint16_t x; // Unsigned integer in the range [0, 65535]
// describing the x-coordinate of the vector.
uint16_t y; // Unsigned integer in the range [0, 65535]
// describing the y-coordinate of the vector.
};
uint32_t v; // Unsigned 32-bit integer representing the 2D vector.
};
XMUSHORT2 can be loaded into instances of XMVECTOR by using XMLoadUShort2.
Instances of XMVECTOR can be stored into an instance of XMUSHORT2 with XMStoreUShort2.
Namespace: Use DirectX::PackedVector
Header: Declared in directxpackedvector.h.