◆ Metal()
Raytracer::Materials::Metal::Metal |
( |
const Utils::Color & | albedo, |
|
|
double | fuzz ) |
Construct a new Metal object.
This function constructs a new Metal object with the given albedo and fuzz. The Metal material scatters light with the given albedo and fuzz.
- Parameters
-
albedo | The albedo of the Metal material. |
fuzz | The fuzz of the Metal material. |
- Returns
- A new Metal object.
◆ emitted()
Emitted light of the Metal material.
This function returns the emitted light of the Metal 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 of intersection. |
- Returns
- The emitted light of the material.
Implements Raytracer::Interfaces::IMaterial.
◆ scatter()
Scatter the ray with the Metal material.
This function scatters the ray with the Metal 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/Metal.hpp
- /Users/javii/Code/raytracer/sources/materials/Metal.cpp