XMFLOAT3SE structure (directxpackedvector.h)
Describes a 3D vector of three floating-point components with 9 bit mantissas, each sharing the same 5-bit exponent.
For a list of additional functionality such as constructors and operators that are available
using XMFLOAT3SE
when you are programming in C++, see XMFLOAT3SE Extensions.
Syntax
struct XMFLOAT3SE {
union {
struct {
uint32_t xm : 9;
uint32_t ym : 9;
uint32_t zm : 9;
uint32_t e : 5;
};
uint32_t v;
};
void XMFLOAT3SE();
void XMFLOAT3SE(
const XMFLOAT3SE & unnamedParam1
);
XMFLOAT3SE & operator=(
const XMFLOAT3SE & unnamedParam1
);
void XMFLOAT3SE(
XMFLOAT3SE && unnamedParam1
);
XMFLOAT3SE & operator=(
XMFLOAT3SE && unnamedParam1
);
void XMFLOAT3SE(
uint32_t Packed
) noexcept;
void XMFLOAT3SE(
float _x,
float _y,
float _z
) noexcept;
void XMFLOAT3SE(
const float *pArray
) noexcept;
void operator uint32_t() noexcept;
XMFLOAT3SE & operator=(
uint32_t Packed
) noexcept;
};
Members
9 xm
The 9-bit x component.
9 ym
The 9-bit y component.
9 zm
The 9-bit z component.
5 e
The 5-bit shared exponent.
v
Unsigned 32-bit integer representing the 3D vector.
Default constructor for XMFLOAT3SE
.
Default constructor for XMFLOAT3SE.
void XMFLOAT3SE( const XMFLOAT3SE & unnamedParam1)
A constructor for XMFLOAT3SE
.
A constructor for XMFLOAT3SE.
XMFLOAT3SE & operator=( const XMFLOAT3SE & unnamedParam1)
void XMFLOAT3SE( XMFLOAT3SE && unnamedParam1)
A constructor for XMFLOAT3SE
.
A constructor for XMFLOAT3SE.
XMFLOAT3SE & operator=( XMFLOAT3SE && unnamedParam1)
void XMFLOAT3SE( uint32_t Packed) noexcept
Initializes a new instance of XMFLOAT3SE
from a uint32_t
variable containing component data in a packed format.
This constructor initializes a new instance of XMFLOAT3SE from a
uint32_t
variable containing component data in a packed format.
void XMFLOAT3SE( float _x, float _y, float _z) noexcept
Initializes a new instance of XMFLOAT3SE
from three float
arguments.
This constructor initializes a new instance of XMFLOAT3SE from three
float
arguments.
void XMFLOAT3SE( const float *pArray) noexcept
Initializes a new instance of XMFLOAT3SE from a three element float
array argument.
This constructor initializes a new instance of XMFLOAT3SE from a from a three element float array argument.
void operator uint32_t() noexcept
Returns an instance of uint32_t
containing the components of the
XMFLOAT3SE
instance in a packed format.
This operator returns an instance of uint32_t
containing the components of the
XMFLOAT3SE instance in a packed format.
XMFLOAT3SE & operator=( uint32_t Packed) noexcept
This operator assigns the vector component data packed in an instance of uint32_t
to
the current instance of XMFLOAT3SE.
Remarks
The values of the three components of an instance of XMFLOAT3SE
are stored in
the v of the instance in the following format: the e member of the
XMFLOAT3SE
structure -- the exponent shared by the mantissas of the
floating point values of all three components of XMFLOAT3SE
-- is
stored in the highest order bits of the return value, and the mantissa of the x
component stored in the least significant bits.
(E5Z9Y9X9): [31] EEEEEzzz zzzzzzyy yyyyyyyx xxxxxxxx [0]
Or in detail:
- Bits 0-8 of Packed are the 9 bit mantissa of the x component's floating point value: the xm member of the current structure.
- Bits 9-17 of Packed are the 9 bit mantissa of the y component's floating point value: the ym member of the current structure.
- Bits 18-26 of Packed are the 9 bit mantissa of the z component's floating point value: the zm member of the current structure.
- Bits 27-31 of Packed are the 5 bit exponent used with the stored mantissas (xm, ym, zm) to represent the size of each component: the e member of the current structure.
XMFLOAT3SE
structure, all component values are positive.
XMFLOAT3SE
can be loaded into instances of XMVECTOR by using XMLoadFloat3SE.
Instances of XMVECTOR
can be stored into an instance of XMFLOAT3SE
with XMStoreFloat3SE.
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
Requirement | Value |
---|---|
Header | directxpackedvector.h |