◆ Quad()
Construct a new Quad object.
This function constructs a new Quad object with the given point, u, v, and material. The quad is centered at the given point with the given u, v, and material.
- Parameters
-
Q | The point of the quad. |
u | The u vector of the quad. |
v | The v vector of the quad. |
material | The material of the quad. |
- Returns
- A new Quad object.
◆ boundingBox()
Get the bounding box of the quad.
This function returns the bounding box of the quad.
- Returns
- The bounding box of the quad.
Implements Raytracer::Interfaces::IHittable.
◆ hit()
Check if the ray hits the quad.
This function checks if the ray hits the quad. The function returns true if the ray hits the quad. The function returns false if the ray does not hit the quad. The function updates the payload with the hit information.
- Parameters
-
ray | The ray to check for hits. |
interval | The interval to check for hits. |
payload | The payload to update with the hit information. |
- Returns
- true if the ray hits the quad, false otherwise.
Implements Raytracer::Interfaces::IHittable.
◆ isInterior()
bool Raytracer::Shapes::Quad::isInterior |
( |
double | a, |
|
|
double | b, |
|
|
Core::Payload & | payload ) const |
|
virtual |
Check if the point is inside the quad.
This function checks if the point is inside the quad. The function returns true if the point is inside the quad. The function returns false if the point is not inside the quad. The function updates the payload with the u and v values of the point.
- Parameters
-
a | The alpha value of the point. |
b | The beta value of the point. |
payload | The payload to update with the u and v values. |
- Returns
- True if the point is inside the quad, false otherwise.
◆ setBBox()
void Raytracer::Shapes::Quad::setBBox |
( |
| ) |
|
|
virtual |
Set the bounding box of the quad.
This function sets the bounding box of the quad.
The documentation for this class was generated from the following files:
- /Users/javii/Code/raytracer/include/shapes/Quad.hpp
- /Users/javii/Code/raytracer/sources/shapes/Quad.cpp