Skip to content

Latest commit

 

History

History
93 lines (71 loc) · 2.3 KB

nf-directxmath-xmvector3reflect.md

File metadata and controls

93 lines (71 loc) · 2.3 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.XMVector3Reflect
XMVector3Reflect function (directxmath.h)
Reflects an incident 3D vector across a 3D normal vector.
Use DirectX..XMVector3Reflect
XMVector3Reflect
XMVector3Reflect method [DirectX Math Support APIs]
dxmath.xmvector3reflect
dxmath\xmvector3reflect.htm
dxmath
M:Microsoft.directx_sdk.geometric.XMVector3Reflect(XMVECTOR,XMVECTOR)
12/05/2018
Use DirectX..XMVector3Reflect, XMVector3Reflect, XMVector3Reflect method [DirectX Math Support APIs], dxmath.xmvector3reflect
directxmath.h
DirectXMath.h
Windows
Use DirectX.
Windows
19H1
XMVector3Reflect
directxmath/XMVector3Reflect
c++
APIRef
kbSyntax
COM
directxmathvector.inl
XMVector3Reflect

XMVector3Reflect function

-description

Reflects an incident 3D vector across a 3D normal vector.

-parameters

-param Incident [in]

3D incident vector to reflect.

-param Normal [in]

3D normal vector to reflect the incident vector across.

-returns

Returns the reflected incident angle.

-remarks

The following pseudocode demonstrates the operation of the function:

XMVECTOR Result;

float s = 2.0f * ( Incident.x * Normal.x + Incident.y * Normal.y + Incident.z * Normal.z );

Result.x = Incident.x - s * Normal.x;
Result.y = Incident.y - s * Normal.y;
Result.z = Incident.z - s * Normal.z;
Result.w = undefined;

return Result;

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

DirectXMath Library 3D Vector Geometric Functions