Skip to content

Latest commit

 

History

History
119 lines (84 loc) · 3.7 KB

nf-directxmath-xmvectorpermute.md

File metadata and controls

119 lines (84 loc) · 3.7 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:directxmath.XMVectorPermute
XMVectorPermute function (directxmath.h)
Permutes the components of two vectors to create a new vector.
Use DirectX..XMVectorPermute
XMVectorPermute
XMVectorPermute method [DirectX Math Support APIs]
dxmath.xmvectorpermute
dxmath\xmvectorpermute.htm
dxmath
M:Microsoft.directx_sdk.component-wise.XMVectorPermute(XMVECTOR,XMVECTOR,unit32_t,unit32_t,unit32_t,unit32_t)
12/05/2018
Use DirectX..XMVectorPermute, XMVectorPermute, XMVectorPermute method [DirectX Math Support APIs], dxmath.xmvectorpermute
directxmath.h
DirectXMath.h
Windows
Use DirectX.
Windows
19H1
XMVectorPermute
directxmath/XMVectorPermute
c++
APIRef
kbSyntax
COM
directxmathvector.inl
XMVectorPermute

XMVectorPermute function

-description

Permutes the components of two vectors to create a new vector.

-parameters

-param V1 [in]

First vector.

-param V2 [in]

Second vector.

-param PermuteX

Index form 0-7 indicating where the X component of the new vector should be copied from.

-param PermuteY

Index form 0-7 indicating where the Y component of the new vector should be copied from.

-param PermuteZ

Index form 0-7 indicating where the Z component of the new vector should be copied from.

-param PermuteW

Index form 0-7 indicating where the W component of the new vector should be copied from.

-returns

Returns the permuted vector that resulted from combining the source vectors.

-remarks

If all 4 indices reference only a single vector (i.e. they are all in the range 0-3 or all in the range 4-7), use XMVectorSwizzle instead for better performance.

The XM_PERMUTE_ constants are provided to use as input values for PermuteX,PermuteY,PermuteZ, and PermuteW.

For constant PermuteX/Y/Z/W parameters, it is much more efficient to use the template form of XMVectorPermute:


template<uint32_t PermuteX, uint32_t PermuteY, uint32_t PermuteZ, uint32_t PermuteW>
    XMVECTOR XMVectorPermute(FXMVECTOR V1, FXMVECTOR V2)

Example: XMVectorPermute<XM_PERMUTE_0Z, XM_PERMUTE_1X, XM_PERMUTE_0W, XM_PERMUTE_1Y>( V1, V2 );
   
Note  This version of XMVectorPermute is new for DirectXMath. The XNAMath v2.x library made use of XMVectorPermuteControl, a control XMVECTOR instead of 4 indices for XMVectorPermute, and used different values for the XM_PERMUTE_x constants.
 

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.

-see-also

Component-Wise Vector Functions

XMVectorSwizzle