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

XMVector3RefractV method

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

Syntax


XMVECTOR XMVector3RefractV(
  [in]  XMVECTOR Incident,
  [in]  XMVECTOR Normal,
  [in]  XMVECTOR RefractionIndex
);

Parameters

Incident [in]

3D incident vector to refract.

Normal [in]

3D normal vector to refract the incident vector through.

RefractionIndex [in]

3D vector whose x, y, and z-components are equal to the index of refraction.

Return value

Returns the refracted incident vector. If the refraction index and the angle between the incident vector and the normal are such that the result is a total internal reflection, the function will return a vector of the form < 0.0f, 0.0f, 0.0f, undefined >.

Remarks

This function is identical to XMVector3Refract except that the RefractionIndex is supplied using a 3D vector instead of a float value.

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

XMVector2Refract

 

 

Community Additions

ADD
Show:
© 2014 Microsoft