Raytracer
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Raytracer::Effects::Smoke Class Reference
Inheritance diagram for Raytracer::Effects::Smoke:
Raytracer::Interfaces::IHittable

Public Member Functions

 Smoke (std::shared_ptr< Interfaces::IHittable > boundary, double density, std::shared_ptr< Interfaces::ITexture > texture)
 Construct a new Smoke object.
 
 Smoke (std::shared_ptr< Interfaces::IHittable > boundary, double density, const Utils::Color &albedo)
 Construct a new Smoke object.
 
bool hit (const Core::Ray &ray, Utils::Interval interval, Core::Payload &payload) const override
 Check if the ray hits the smoke.
 
Utils::AxisAlignedBBox boundingBox () const override
 Get the bounding box of the smoke.
 

Constructor & Destructor Documentation

◆ Smoke() [1/2]

Raytracer::Effects::Smoke::Smoke ( std::shared_ptr< Interfaces::IHittable > boundary,
double density,
std::shared_ptr< Interfaces::ITexture > texture )

Construct a new Smoke object.

This function constructs a new Smoke object with the given boundary, density, and texture. The smoke is created within the boundary with the given density and texture. The phase function of the smoke is set to isotropic with the given texture.

Parameters
boundaryThe boundary to create the smoke within.
densityThe density of the smoke.
textureThe texture of the smoke.
Returns
A new Smoke object.

◆ Smoke() [2/2]

Raytracer::Effects::Smoke::Smoke ( std::shared_ptr< Interfaces::IHittable > boundary,
double density,
const Utils::Color & albedo )

Construct a new Smoke object.

This function constructs a new Smoke object with the given boundary, density, and albedo. The smoke is created within the boundary with the given density and albedo. The phase function of the smoke is set to isotropic with the given albedo.

Parameters
boundaryThe boundary to create the smoke within.
densityThe density of the smoke.
albedoThe albedo of the smoke.
Returns
A new Smoke object.

Member Function Documentation

◆ boundingBox()

Raytracer::Utils::AxisAlignedBBox Raytracer::Effects::Smoke::boundingBox ( ) const
overridevirtual

Get the bounding box of the smoke.

This function returns the bounding box of the smoke.

Returns
The bounding box of the smoke.

Implements Raytracer::Interfaces::IHittable.

◆ hit()

bool Raytracer::Effects::Smoke::hit ( const Core::Ray & ray,
Utils::Interval interval,
Core::Payload & payload ) const
overridevirtual

Check if the ray hits the smoke.

This function checks if the ray hits the smoke. The function returns true if the ray hits the smoke. The function returns false if the ray does not hit the smoke. The function updates the payload with the hit information.

Parameters
rayThe ray to check for hits.
intervalThe interval to check for hits.
payloadThe payload to update with the hit information.
Returns
True if the ray hits the smoke, false otherwise.

Implements Raytracer::Interfaces::IHittable.


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