XMVectorSetByIndex method
Use a floating-point object to set the value of one of the four components of an XMVECTOR Data Type containing integer data referenced by an index.
XMVECTOR XMVectorSetByIndex(
XMVECTOR V,
float f,
size_t i
);
V
A XMVECTOR Data Type containing integer data.f
The floating point value used to set the i component of the returned XMVECTOR Data Type.i
The index of the component to be retrieved.
An instance of XMVECTOR Data Type whose i component has been set to the floating-point value provided by the argument f. All other components of the returned XMVECTOR Data Type instance have the same value as those of the input vector V.
The value of i must be positive and less than or equal to three ( 0 <= i <= 3 ).
The indexes have the following correspondence with XMVECTOR Data Type vector components:
Index | Component |
---|---|
|
|
|
|
|
|
|
|
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.
Namespace |
Use DirectX. |
Header |
DirectXMath.h |