XMVECTOR Data Type
A portable type used to represent a vector of four 32-bit floating-point or integer components, each aligned optimally and mapped to a hardware vector register.
For a list of additional functionality, such as constructors and operators, available using
programming in C++, see XMVECTOR Extensions.
In the DirectXMath Library, to fully support portability and optimization,
XMVECTOR is, by design, an opaque
type. The actual implementation of
XMVECTOR is platform dependent.
In general, code should not rely on the specifics of any given platform specific implementation of
Platform-specific implementations have these characteristics:
- They are not portable.
- They may change between releases.
- Injudicious use of implementation details may be suboptimal.
For projects that need detailed information about how to implement
XMVECTOR on different platforms, see
The DirectXMath.h header file uses aliases to the
XMVECTOR object, specifically CXMVECTOR and
FXMVECTOR. The header uses these aliases to comply with the optimal in-line calling conventions of
different compilers. For most projects that use DirectXMath it is sufficient to treat these types as an exact alias to
[CDATA[ typedef const XMVECTOR FXMVECTOR; typedef const XMVECTOR CXMVECTOR; ]]
For projects that need detailed information about how different platforms handle their calling conventions, see Library Internals.
For XNAMATH 2.x, the
XMVECTOR data type has .x, .y, .z, .and .w element members, which generally cause poor performance. The use of the XM_STRICT_VECTOR4 type provides an opt-in of the DirectXMath definition of an opaque data type.
Namespace: Use DirectX
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.
- XMVECTORI32 Data Type
- XMVECTORF32 Data Type
- XMVECTORU32 Data Type
- XMVECTORU8 Data Type
- XMVECTOR Data Type
Build date: 11/16/2013