XMConvertFloatToHalfStream
XMConvertHalfToFloatStream
XMMatrixDecompose
XMPlaneTransformStream
XMVector2TransformCoordStream
XMVector2TransformNormalStream
XMVector2TransformStream
XMVector3ProjectStream
XMVector3TransformCoordStream
XMVector3TransformNormalStream
XMVector3TransformStream
XMVector3UnprojectStream
XMVector4TransformStream
Expand Minimize

XMVectorInsert method

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

Syntax


XMVECTOR XMVectorInsert(
  [in]  XMVECTOR VD,
  [in]  XMVECTOR VS,
  [in]  uint32_t VSLeftRotateElements,
  [in]  uint32_t Select0,
  [in]  uint32_t Select1,
  [in]  uint32_t Select2,
  [in]  uint32_t Select3
);

Parameters

VD [in]

Vector to insert into.

VS [in]

Vector to rotate left.

VSLeftRotateElements [in]

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

Select0 [in]

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 [in]

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 [in]

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 [in]

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 XMVectorInsert should be assigned back to VD.

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



template<uint32_t VSLeftRotateElements, uint32_t Select0, uint32_t Select1, uint32_t Select2, uint32_t Select3>
    XMVECTOR XMVectorInsert(FXMVECTOR VD, FXMVECTOR VS)
   

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

Namespace

Use DirectX.

Header

DirectXMath.h

See also

XMVectorPermute
XMVectorRotateLeft
XMVectorRotateRight
XMVectorShiftLeft

 

 

Community Additions

ADD
Show:
© 2014 Microsoft