◆ Translate()
Construct a new Translate object.
This function constructs a new Translate object with the given object and offset. The object is translated by the given offset.
- Parameters
-
object | The object to translate. |
offset | The offset to translate the object by. |
- Returns
- A new Translate object.
◆ boundingBox()
Get the bounding box of the translated object.
This function returns the bounding box of the translated object.
- Returns
- The bounding box of the translated object.
Implements Raytracer::Interfaces::IHittable.
◆ hit()
Check if the ray hits the translated object.
This function checks if the ray hits the translated object. The function returns true if the ray hits the translated object. The function returns false if the ray does not hit the translated object. 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 translated object, false otherwise.
Implements Raytracer::Interfaces::IHittable.
The documentation for this class was generated from the following files:
- /Users/javii/Code/raytracer/include/effects/Translate.hpp
- /Users/javii/Code/raytracer/sources/effects/Translate.cpp