Function directx_math::XMVectorInsert[][src]

pub fn XMVectorInsert(
    VD: FXMVECTOR,
    VS: FXMVECTOR,
    VSLeftRotateElements: u32,
    Select0: u32,
    Select1: u32,
    Select2: u32,
    Select3: u32
) -> XMVECTOR

Rotates a vector left by a given number of 32-bit components and insert selected elements of that result into another vector.

Parameters

VD Vector to insert into.

VS Vector to rotate left.

VSLeftRotateElements Number of 32-bit components by which to rotate VS left.

Select0 Either 0 or 1. If one, the x-component of the rotated vector will be inserted into the corresponding component of VD. Otherwise, the x-component of VD is left alone.

Select1 Either 0 or 1. If one, the y-component of the rotated vector will be inserted into the corresponding component of VD. Otherwise, the y-component of VD is left alone.

Select2 Either 0 or 1. If one, the z-component of the rotated vector will be inserted into the corresponding component of VD. Otherwise, the z-component of VD is left alone.

Select3 Either 0 or 1. If one, the w-component of the rotated vector will be inserted into the corresponding component of VD. Otherwise, the w-component of VD is left alone.

Return value

Returns the XMVECTOR that results from the rotation and insertion.

Remarks

For best performance, the result of XMVectorInsertshould be assigned back to VD.

For cases with constant uint32_t parameters, it is more efficent to use the template form of XMVectorInsert:

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxmath/nf-directxmath-XMVectorInsert