Raytracer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Raytracer::Textures::Checker Class Reference
Inheritance diagram for Raytracer::Textures::Checker:
Raytracer::Interfaces::ITexture

Public Member Functions

 Checker (double scale, std::shared_ptr< Interfaces::ITexture > even, std::shared_ptr< Interfaces::ITexture > odd)
 Construct a new Checker object.
 
 Checker (double scale, const Utils::Color &a, const Utils::Color &b)
 Construct a new Checker object.
 
Utils::Color value (double u, double v, const Utils::Point3 &point) const override
 Get the value of the checker texture.
 

Constructor & Destructor Documentation

◆ Checker() [1/2]

Raytracer::Textures::Checker::Checker ( double scale,
std::shared_ptr< Interfaces::ITexture > even,
std::shared_ptr< Interfaces::ITexture > odd )

Construct a new Checker object.

This function constructs a new Checker object with the given scale, even texture, and odd texture.

Parameters
scaleThe scale of the checker texture.
evenThe even texture of the checker texture.
oddThe odd texture of the checker texture.
Returns
A new Checker object.

◆ Checker() [2/2]

Raytracer::Textures::Checker::Checker ( double scale,
const Utils::Color & a,
const Utils::Color & b )

Construct a new Checker object.

This function constructs a new Checker object with the given scale, even color, and odd color.

Parameters
scaleThe scale of the checker texture.
aThe even color of the checker texture.
bThe odd color of the checker texture.
Returns
A new Checker object.

Member Function Documentation

◆ value()

Raytracer::Utils::Color Raytracer::Textures::Checker::value ( double u,
double v,
const Utils::Point3 & point ) const
overridevirtual

Get the value of the checker texture.

This function returns the value of the checker texture at the given UV coordinates and point.

Parameters
uThe U coordinate.
vThe V coordinate.
pointThe point.
Returns
The value of the checker texture.

Implements Raytracer::Interfaces::ITexture.


The documentation for this class was generated from the following files: