Raytracer
Loading...
Searching...
No Matches
include
materials
Metal.hpp
1
#include "interfaces/IMaterial.hpp"
2
3
#ifndef __METAL_HPP__
4
#define __METAL_HPP__
5
6
namespace
Raytracer::Materials
7
{
8
class
Metal
:
public
Interfaces::IMaterial
{
9
private
:
10
Utils::Color
_albedo;
11
double
_fuzz;
12
13
public
:
14
Metal
(
const
Utils::Color
&albedo,
double
fuzz);
15
bool
scatter
(
const
Core::Ray
&ray,
const
Core::Payload
&payload,
16
Utils::Color
&attenuation,
Core::Ray
&scattered)
const override
;
17
Utils::Color
emitted
(
18
double
u,
double
v,
const
Utils::Point3
&point)
const override
;
19
};
20
}
// namespace Raytracer::Materials
21
22
#endif
/* __METAL_HPP__ */
Raytracer::Core::Payload
Definition
Payload.hpp:11
Raytracer::Core::Ray
Definition
Ray.hpp:9
Raytracer::Interfaces::IMaterial
Definition
IMaterial.hpp:14
Raytracer::Materials::Metal
Definition
Metal.hpp:8
Raytracer::Materials::Metal::scatter
bool scatter(const Core::Ray &ray, const Core::Payload &payload, Utils::Color &attenuation, Core::Ray &scattered) const override
Scatter the ray with the Metal material.
Definition
Metal.cpp:34
Raytracer::Materials::Metal::Metal
Metal(const Utils::Color &albedo, double fuzz)
Construct a new Metal object.
Definition
Metal.cpp:15
Raytracer::Materials::Metal::emitted
Utils::Color emitted(double u, double v, const Utils::Point3 &point) const override
Emitted light of the Metal material.
Definition
Metal.cpp:59
Raytracer::Utils::VecN
Definition
VecN.hpp:40
Generated by
1.10.0