Raytracer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Raytracer::Materials::Isotropic Class Reference
Inheritance diagram for Raytracer::Materials::Isotropic:
Raytracer::Interfaces::IMaterial

Public Member Functions

 Isotropic (std::shared_ptr< Interfaces::ITexture > texture)
 Construct a new Isotropic object.
 
 Isotropic (const Utils::Color &color)
 Construct a new Isotropic object.
 
bool scatter (const Core::Ray &ray, const Core::Payload &payload, Utils::Color &attenuation, Core::Ray &scattered) const override
 Scatter the ray with the isotropic material.
 
Utils::Color emitted (double u, double v, const Utils::Point3 &point) const override
 Emitted light of the isotropic material.
 

Constructor & Destructor Documentation

◆ Isotropic() [1/2]

Raytracer::Materials::Isotropic::Isotropic ( std::shared_ptr< Interfaces::ITexture > texture)

Construct a new Isotropic object.

This function constructs a new Isotropic object with the given texture.

Parameters
textureThe texture of the isotropic material.
Returns
A new Isotropic object.

◆ Isotropic() [2/2]

Raytracer::Materials::Isotropic::Isotropic ( const Utils::Color & color)

Construct a new Isotropic object.

This function constructs a new Isotropic object with the given color.

Parameters
colorThe color of the isotropic material.
Returns
A new Isotropic object.

Member Function Documentation

◆ emitted()

Raytracer::Utils::Color Raytracer::Materials::Isotropic::emitted ( double u,
double v,
const Utils::Point3 & point ) const
overridevirtual

Emitted light of the isotropic material.

This function returns the emitted light of the isotropic material. The function returns the emitted light of the material at the given point.

Parameters
uThe u texture coordinate.
vThe v texture coordinate.
pointThe point to get the emitted light from.
Returns
The emitted light of the isotropic material.

Implements Raytracer::Interfaces::IMaterial.

◆ scatter()

bool Raytracer::Materials::Isotropic::scatter ( const Core::Ray & ray,
const Core::Payload & payload,
Utils::Color & attenuation,
Core::Ray & scattered ) const
overridevirtual

Scatter the ray with the isotropic material.

This function scatters the ray with the isotropic 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
rayThe ray to scatter.
payloadThe payload of the ray.
attenuationThe attenuation of the ray.
scatteredThe 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: