Defines a control vector for use in XMVectorSelect.
XMVECTOR XMVectorSelectControl(
uint32_t VectorIndex0,
uint32_t VectorIndex1,
uint32_t VectorIndex2,
uint32_t VectorIndex3
)
VectorIndex0
Type: uint32_t
Index that determines which vector in XMVectorSelect will be selected. If zero, the first vector’s first component will be selected. Otherwise, the second vector’s component will be selected.
VectorIndex1
Type: uint32_t
Index that determines which vector in XMVectorSelect will be selected. If zero, the first vector’s second component will be selected. Otherwise, the second vector’s component will be selected.
VectorIndex2
Type: uint32_t
Index that determines which vector in XMVectorSelect will be selected. If zero, the first vector’s third component will be selected. Otherwise, the second vector’s component will be selected.
VectorIndex3
Type: uint32_t
Index that determines which vector in XMVectorSelect will be selected. If zero, the first vector’s fourth component will be selected. Otherwise, the second vector’s component will be selected.
Type: XMVECTOR
Returns the control vector.
The following pseudocode demonstrates the operation of the function:
XMVECTOR ControlVector;
const uint32_t ControlElement[] =
{
XM_SELECT_0,
XM_SELECT_1
};
assert(VectorIndex0 < 2);
assert(VectorIndex1 < 2);
assert(VectorIndex2 < 2);
assert(VectorIndex3 < 2);
ControlVector.u[0] = ControlElement[VectorIndex0];
ControlVector.u[1] = ControlElement[VectorIndex1];
ControlVector.u[2] = ControlElement[VectorIndex2];
ControlVector.u[3] = ControlElement[VectorIndex3];
return ControlVector;
Header: Declared in directxmath.h.