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. |
|
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 |
|
|
|
|
|
|
Reflects an incident 3D vector across a 3D normal vector.
3D incident vector to reflect.
3D normal vector to reflect the incident vector across.
Returns the reflected incident angle.
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;