raytracer
Parallel Ray Tracer written from scratch (no graphics API).
Loading...
Searching...
No Matches
renderer.h
Go to the documentation of this file.
1#pragma once
2#include <thread>
3#include <span>
4
5#include "scene.h"
6#include "common/image.h"
9
11{
13{
14 static double calculate_iterations(common::Complex c, int escape_boundary_squared, int max_iterations);
15 static common::Vec3 get_mandelbrot_color(double iterations, int max_iterations,
16 std::span<const common::Vec3> palette);
17 static common::Complex get_coordinate(int row, int col, const MandelbrotSceneSpace &mss);
18
19 public:
28 static common::Image render(
29 const MandelbrotSceneConfig &scene, std::ostream &out = common::get_nullout(),
30 int number_of_threads = static_cast<int>(std::max(1U, std::thread::hardware_concurrency())));
31};
32} // namespace raytracer::mandelbrot
Definition image.h:11
Definition renderer.h:13
static common::Image render(const MandelbrotSceneConfig &scene, std::ostream &out=common::get_nullout(), int number_of_threads=static_cast< int >(std::max(1U, std::thread::hardware_concurrency())))
Definition renderer.cpp:68
std::ostream & get_nullout()
Definition terminal.h:11
Definition mandelbrot.cpp:14
Definition complex.h:11
Definition vec3.h:11