XMFLOAT3PK union
Describes a 3D vector with X and Y components stored as 11 bit floating point number, and Z component stored as a 10 bit floatingpoint value.
For a list of additional functionality, such as constructors and operators, available using
XMFLOAT3PK
when programming in C++, see XMFLOAT3PK Extensions.
Syntax
union XMFLOAT3PK { union { struct { uint32_t xm : 6; uint32_t xe : 5; uint32_t ym : 6; uint32_t ye : 5; uint32_t zm : 5; uint32_t ze : 5; }; uint32_t v; }; };
Members
 xm : 6

The 6bit mantissa for the x component.
 xe : 5

The 5bit biased exponent for the x component.
 ym : 6

The 6bit mantissa for the y component.
 ye : 5

The 5bit biased exponent for the y component.
 zm : 5

The 5bit mantissa for the z component.
 ze : 5

The 5bit biased exponent for the z component.
 v

Unsigned 32bit integer representing the 3D vector.
Remarks
There are no sign bits. This means all partialprecision numbers are positive. The z component is stored in the most significant bits, and the x component is stored in the least significant bits like this:
(Z10Y11X11): [31] ZZZZZzzz zzYYYYYy yyyyyXXX XXxxxxxx [0]
Or in detail:

Bits 05 of v are the 6 bit mantissa of the x component's floating point value: the xm member of the structure.

Bits 610 of v are the 5 bit exponent of the x component's floating point value the xe member of the structure.

Bits 1116 of v are the 6bit mantissa of the y component's floating point value: the ym member of the structure.

Bits 1721 of v are the 5 bit exponent of the y component's floating point value: the ye member of the structure.

Bits 2226 of v are the 5 bit mantissa of the z component's floating point value: the zm member of the structure.

Bits 2731 of v are the 5 bit exponent of the z component's floating point value: the ze member of the structure.
XMFLOAT3PK
can be loaded into instances of XMVECTOR by using XMLoadFloat3PK.
Instances of XMVECTOR
can be stored into an instance of XMFLOAT3PK
with XMStoreFloat3PK.
MIN_F10 / MIN_F11 = 6.10352e5
MAX_F10 = 64512
MAX_F11 = 65024
Namespace: Use DirectX::PackedVector
Platform Requirements
Microsoft Visual Studio 2010 or Microsoft Visual Studio 2012 with the Windows SDK for Windows 8. Supported for Win32 desktop apps, Windows Store apps, and Windows Phone 8 apps.
Requirements
Header 


See also