Raytracer
|
Public Member Functions | |
RotateY (std::shared_ptr< Interfaces::IHittable > object, double angle) | |
Construct a new RotateY object. | |
bool | hit (const Core::Ray &ray, Utils::Interval interval, Core::Payload &payload) const override |
Check if the ray hits the rotated object. | |
Utils::AxisAlignedBBox | boundingBox () const override |
Get the bounding box of the rotated object. | |
Raytracer::Effects::RotateY::RotateY | ( | std::shared_ptr< Interfaces::IHittable > | object, |
double | angle ) |
Construct a new RotateY object.
This function constructs a new RotateY object with the given object and angle. The object is rotated around the y-axis by the given angle. The bounding box of the object is updated with the rotated bounding box.
object | The object to rotate. |
angle | The angle to rotate the object by. |
|
overridevirtual |
Get the bounding box of the rotated object.
This function returns the bounding box of the rotated object.
Implements Raytracer::Interfaces::IHittable.
|
overridevirtual |
Check if the ray hits the rotated object.
This function checks if the ray hits the rotated object. The function returns true if the ray hits the rotated object. The function returns false if the ray does not hit the rotated object. 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.