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

Public Member Functions

 SolidColor (const Utils::Color &albedo)
 Construct a new SolidColor object.
 
 SolidColor (double red, double green, double blue)
 Construct a new SolidColor object.
 
Utils::Color value (double u, double v, const Utils::Point3 &point) const override
 Get the value of the solid color texture.
 

Constructor & Destructor Documentation

◆ SolidColor() [1/2]

Raytracer::Textures::SolidColor::SolidColor ( const Utils::Color & albedo)

Construct a new SolidColor object.

This function constructs a new SolidColor object with the given albedo. The SolidColor texture is a texture that generates a solid color.

Parameters
albedoThe albedo of the solid color texture.
Returns
A new SolidColor object.

◆ SolidColor() [2/2]

Raytracer::Textures::SolidColor::SolidColor ( double red,
double green,
double blue )

Construct a new SolidColor object.

This function constructs a new SolidColor object with the given red, green, and blue values. The SolidColor texture is a texture that generates a solid color.

Parameters
redThe red value of the solid color texture.
greenThe green value of the solid color texture.
blueThe blue value of the solid color texture.
Returns
A new SolidColor object.

Member Function Documentation

◆ value()

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

Get the value of the solid color texture.

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

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

Implements Raytracer::Interfaces::ITexture.


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