Raytracer
|
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. | |
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.
boundary | The boundary to create the smoke within. |
density | The density of the smoke. |
texture | The texture of the smoke. |
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.
boundary | The boundary to create the smoke within. |
density | The density of the smoke. |
albedo | The albedo of the smoke. |
|
overridevirtual |
Get the bounding box of the smoke.
This function returns the bounding box of the smoke.
Implements Raytracer::Interfaces::IHittable.
|
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.
ray | The ray to check for hits. |
interval | The interval to check for hits. |
payload | The payload to update with the hit information. |
Implements Raytracer::Interfaces::IHittable.