◆ Lambertian() [1/2]
Raytracer::Materials::Lambertian::Lambertian |
( |
const Utils::Color & | albedo | ) |
|
Construct a new Lambertian object.
This function constructs a new Lambertian object with the given albedo. The Lambertian material scatters light with the given albedo.
- Parameters
-
- Returns
- A new Lambertian object.
◆ Lambertian() [2/2]
Construct a new Lambertian object.
This function constructs a new Lambertian object with the given texture. The Lambertian material scatters light with the given texture.
- Parameters
-
- Returns
- A new Lambertian object.
◆ emitted()
Emitted light of the Lambertian material.
This function returns the emitted light of the Lambertian material. The function returns the emitted light of the material at the given point.
- Parameters
-
u | The u coordinate of the texture. |
v | The v coordinate of the texture. |
point | The point to get the emitted light from. |
- Returns
- The emitted light of the material.
Implements Raytracer::Interfaces::IMaterial.
◆ scatter()
Scatter the ray with the Lambertian material.
This function scatters the ray with the Lambertian material. The function returns true if the ray is scattered. The function returns false if the ray is not scattered. The function updates the attenuation and scattered ray.
- Parameters
-
ray | The ray to scatter. |
payload | The payload of the ray. |
attenuation | The attenuation of the ray. |
scattered | The scattered ray. |
- Returns
- true if the ray is scattered, false otherwise.
Implements Raytracer::Interfaces::IMaterial.
The documentation for this class was generated from the following files:
- /Users/javii/Code/raytracer/include/materials/Lambertian.hpp
- /Users/javii/Code/raytracer/sources/materials/Lambertian.cpp