XMHALF4 structure (directxpackedvector.h)
Describes a 4D vector consisting of four half-precision (16-bit) floating-point values.
For a list of additional functionality such as constructors and operators that are available
using XMHALF4
when you are programming in C++, see XMHALF4 Extensions.
Syntax
struct XMHALF4 {
union {
struct {
HALF x;
HALF y;
HALF z;
HALF w;
};
uint64_t v;
};
void XMHALF4();
void XMHALF4(
const XMHALF4 & unnamedParam1
);
XMHALF4 & operator=(
const XMHALF4 & unnamedParam1
);
void XMHALF4(
XMHALF4 && unnamedParam1
);
XMHALF4 & operator=(
XMHALF4 && unnamedParam1
);
void XMHALF4(
uint64_t Packed
) noexcept;
void XMHALF4(
HALF _x,
HALF _y,
HALF _z,
HALF _w
) noexcept;
void XMHALF4(
const HALF *pArray
) noexcept;
void XMHALF4(
float _x,
float _y,
float _z,
float _w
) noexcept;
void XMHALF4(
const float *pArray
) noexcept;
XMHALF4 & operator=(
uint64_t Packed
) noexcept;
};
Members
x
HALF value describing the x-coordinate.
y
HALF value describing the y-coordinate.
z
HALF value describing the z-coordinate.
w
HALF value describing the w-coordinate.
v
Default constructor for XMHALF4
.
Default constructor for XMHALF4.
void XMHALF4( const XMHALF4 & unnamedParam1)
A constructor for XMHALF4
.
A constructor for XMHALF4.
XMHALF4 & operator=( const XMHALF4 & unnamedParam1)
Assigns the vector component data from one instance of XMHALF4
to the current instance of XMHALF4
.
This operator assigns the vector component data from one instance of XMHALF4 to the current instance of XMHALF4
.
void XMHALF4( XMHALF4 && unnamedParam1)
A constructor for XMHALF4
.
A constructor for XMHALF4.
XMHALF4 & operator=( XMHALF4 && unnamedParam1)
void XMHALF4( uint64_t Packed) noexcept
A constructor for XMHALF4
.
A constructor for XMHALF4.
void XMHALF4( HALF _x, HALF _y, HALF _z, HALF _w) noexcept
Initializes a new instance of XMHALF4
from four HALF
arguments.
This constructor initializes a new instance of XMHALF4 from four
HALF
arguments.
void XMHALF4( const HALF *pArray) noexcept
Initializes a new instance of XMHALF4 from a four element HALF
array argument.
This constructor initializes a new instance of XMHALF4 from a from a four element XMHALF4
array argument.
void XMHALF4( float _x, float _y, float _z, float _w) noexcept
Initializes a new instance of XMHALF4
from four float
arguments.
This constructor initializes a new instance of XMHALF4 from four
float
arguments.
void XMHALF4( const float *pArray) noexcept
Initializes a new instance of XMHALF4 from a four element float
array argument.
This constructor initializes a new instance of XMHALF4 from a four element float
array argument.
XMHALF4 & operator=( uint64_t Packed) noexcept
Remarks
The definition of the HALF
type used under DirectXMath is consistent with the IEEE
standard, and consists of a sign bit, a 5 bit biased exponent, and a 10 bit
mantissa:
[15] SEEEEEMMMMMMMMMM [0]
XMHALF4
can be loaded into instances of XMVECTOR by
using XMLoadHalf4.
Instances of XMVECTOR
can be stored into an instance of XMHALF4
with XMStoreHalf4.
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 |