Dielectric class
A smooth dielectric surface that reflects and refracts light according to the specified index of refraction ior.
Base classes
- class Material
- A base class used to represent surface material properties.
Public functions
Public variables
- float ior
- The (relative) index of refraction of the material.
Function documentation
bool Dielectric:: scatter(const Ray3f& ray,
const HitInfo& hit,
Color3f& attenuation,
Ray3f& scattered) const override
Compute the scattered direction scattered at a surface hitpoint.
Parameters | |
---|---|
ray | incoming ray |
hit | the ray's intersection with the surface |
attenuation | how much the light should be attenuated |
scattered | the direction light should be scattered |
Returns | bool True if the surface scatters light |
The base Material does not scatter any light, so it simply returns false.