4#include "interfaces/IHittable.hpp"
5#include "utils/VecN.hpp"
10namespace Raytracer::Core
14 double _aspectRatio = 1.0;
15 int _imageWidth = 100;
16 int _samplesPerPixel = 10;
25 double _defocusAngle = 0;
26 double _focusDistance = 10;
29 double _pixelSampleScale;
50 const std::chrono::steady_clock::time_point &start,
int j)
const;
51 GET_SET(
double, aspectRatio)
52 GET_SET(
int, imageWidth)
53 GET_SET(
int, samplesPerPixel)
54 GET_SET(
int, maxDepth)
60 GET_SET(
double, defocusAngle)
61 GET_SET(
double, focusDistance)
62 GET_SET(
int, imageHeight)
63 GET_SET(
double, pixelSampleScale)
void progress(const std::chrono::steady_clock::time_point &start, int j) const
Print the progress of the rendering.
Definition Camera.cpp:216
void render(const Interfaces::IHittable &world)
Render the scene with the given camera.
Definition Camera.cpp:70
Utils::Color rayColor(const Ray ray, int depth, const Interfaces::IHittable &world) const
Get the color of the ray.
Definition Camera.cpp:176
Utils::Vec3 sampleDisk(double radius) const
Sample a disk.
Definition Camera.cpp:143
Core::Ray getRay(double u, double v) const
Get the ray for the given pixel.
Definition Camera.cpp:106
Utils::Vec3 sampleDefocusDisk() const
Sample the defocus disk.
Definition Camera.cpp:155
Utils::Vec3 sampleSquare() const
Sample a square.
Definition Camera.cpp:128
void setup()
Set up the camera with the given parameters.
Definition Camera.cpp:24
Definition IHittable.hpp:11