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
4#include "scene.h"
5#include "common/image.h"
7#include "common/util/vec3.h"
8
10{
12{
13 common::Vec3 shade(const Object &o, const common::Vec3 &intersection, const Ray &r, int depth, int max_depth,
14 const RayTracerSceneConfig &scene);
15 common::Vec3 trace(const Ray &r, int depth, int max_depth, const RayTracerSceneConfig &scene);
16
17 public:
26 common::Image render(const RayTracerSceneConfig &scene, std::ostream &out = common::get_nullout(),
27 int number_of_threads = static_cast<int>(std::max(1U, std::thread::hardware_concurrency())));
28};
29} // namespace raytracer::raytracer
Definition image.h:11
Definition object.h:18
Definition renderer.h:12
common::Image render(const RayTracerSceneConfig &scene, std::ostream &out=common::get_nullout(), int number_of_threads=static_cast< int >(std::max(1U, std::thread::hardware_concurrency())))
Definition renderer.cpp:48
std::ostream & get_nullout()
Definition terminal.h:11
Definition raytracer.cpp:29
Definition vec3.h:11