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
"
7
#include "
common/util/complex.h
"
8
#include "
common/util/terminal.h
"
9
10
namespace
raytracer::mandelbrot
11
{
12
class
Renderer
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
raytracer::common::Image
Definition
image.h:11
raytracer::mandelbrot::Renderer
Definition
renderer.h:13
raytracer::mandelbrot::Renderer::render
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
complex.h
image.h
scene.h
raytracer::common::get_nullout
std::ostream & get_nullout()
Definition
terminal.h:11
raytracer::mandelbrot
Definition
mandelbrot.cpp:14
raytracer::common::Complex
Definition
complex.h:11
raytracer::common::Vec3
Definition
vec3.h:11
raytracer::mandelbrot::MandelbrotSceneConfig
Definition
scene.h:13
raytracer::mandelbrot::MandelbrotSceneSpace
Definition
scene.h:30
terminal.h
mandelbrot
include
mandelbrot
renderer.h
Generated by
1.15.0