Back to class index
| Plane::RefractSyntaxfloat4 Plane::Refract(const float4 &float4, float negativeSideRefractionIndex, float positiveSideRefractionIndex) const; [4 lines of code]Refracts the given incident vector along this plane. By convention, the input vector should point towards the plane, and the returned vector will point away from the plane. When the ray is going from a denser material to a lighter one, total internal reflection can occur. In this case, this function will just return a reflected vector from a call to Reflect(). ParametersfloatnegativeSideRefractionIndexThe refraction index of the material we are exiting. floatpositiveSideRefractionIndexThe refraction index of the material we are entering. Work in progress:Todo: in float4 Plane::Refract(const float4 &float4, float negativeSideRefractionIndex, float positiveSideRefractionIndex) const: Add Plane::Reflect. |