◆ DiffuseLight() [1/2]
Construct a new DiffuseLight object.
This function constructs a new DiffuseLight object with the given texture. The diffuse light material emits light with the given texture.
- Parameters
-
texture | The texture of the diffuse light. |
- Returns
- A new DiffuseLight object.
◆ DiffuseLight() [2/2]
Raytracer::Materials::DiffuseLight::DiffuseLight |
( |
const Utils::Color & | color | ) |
|
Construct a new DiffuseLight object.
This function constructs a new DiffuseLight object with the given color. The diffuse light material emits light with the given color.
- Parameters
-
color | The color of the diffuse light. |
- Returns
- A new DiffuseLight object.
◆ emitted()
Emitted light of the diffuse light material.
This function returns the emitted light of the diffuse light 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 diffuse light material.
This function scatters the ray with the diffuse light 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/DiffuseLight.hpp
- /Users/javii/Code/raytracer/sources/materials/DiffuseLight.cpp