[][src]Function directx_math::XMVector3RefractV

pub fn XMVector3RefractV(
    Incident: FXMVECTOR,
    Normal: FXMVECTOR,
    RefractionIndex: FXMVECTOR
) -> FXMVECTOR

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

Parameters

Incident 3D incident vector to refract.

Normal 3D normal vector to refract the incident vector through.

RefractionIndex 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.0, 0.0, 0.0, undefined >.

Remarks

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

Reference

https://docs.microsoft.com/en-us/windows/win32/api/directxmath/nf-directxmath-XMVector3RefractV