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

Public Member Functions

 RotateZ (std::shared_ptr< Interfaces::IHittable > object, double angle)
 Construct a new RotateZ 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.
 

Constructor & Destructor Documentation

◆ RotateZ()

Raytracer::Effects::RotateZ::RotateZ ( std::shared_ptr< Interfaces::IHittable > object,
double angle )

Construct a new RotateZ object.

This function constructs a new RotateZ object with the given object and angle. The object is rotated around the z-axis by the given angle. The bounding box of the object is updated with the rotated bounding box.

Parameters
objectThe object to rotate.
angleThe angle to rotate the object by.
Returns
A new RotateZ object.

Member Function Documentation

◆ boundingBox()

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

Get the bounding box of the rotated object.

This function returns the bounding box of the rotated object.

Returns
The bounding box of the rotated object.

Implements Raytracer::Interfaces::IHittable.

◆ hit()

bool Raytracer::Effects::RotateZ::hit ( const Core::Ray & ray,
Utils::Interval interval,
Core::Payload & payload ) const
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.

Parameters
rayThe ray to check for hits.
intervalThe interval to check for hits.

Implements Raytracer::Interfaces::IHittable.


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