SPH
|
Base class for renderers based on raytracing. More...
#include <IRenderer.h>
Classes | |
struct | ThreadData |
Public Member Functions | |
IRaytracer (SharedPtr< IScheduler > scheduler, const GuiSettings &gui) | |
virtual void | render (const RenderParams ¶ms, Statistics &stats, IRenderOutput &output) const final |
Draws particles into the bitmap, given the data provided in initialize. More... | |
virtual void | cancelRender () override |
Stops the rendering if it is currently in progress. More... | |
![]() | |
virtual void | initialize (const Storage &storage, const IColorizer &colorizer, const ICamera &camera)=0 |
Prepares the objects for rendering and updates its data. More... | |
virtual bool | isInitialized () const =0 |
Checks if the renderer has been initialized. More... | |
![]() | |
virtual | ~Polymorphic () |
Protected Member Functions | |
virtual Rgba | shade (const RenderParams ¶ms, const CameraRay &ray, ThreadData &data) const =0 |
Rgba | getEnviroColor (const CameraRay &ray) const |
Protected Attributes | |
SharedPtr< IScheduler > | scheduler |
ThreadLocal< ThreadData > | threadData |
std::atomic_bool | shouldContinue |
Base class for renderers based on raytracing.
Definition at line 196 of file IRenderer.h.
IRaytracer::IRaytracer | ( | SharedPtr< IScheduler > | scheduler, |
const GuiSettings & | gui | ||
) |
Definition at line 38 of file IRenderer.cpp.
|
inlineoverridevirtual |
Stops the rendering if it is currently in progress.
Implements IRenderer.
Definition at line 245 of file IRenderer.h.
Definition at line 149 of file IRenderer.cpp.
|
finalvirtual |
Draws particles into the bitmap, given the data provided in initialize.
This function is called every time the view changes (display parameters change, camera pan & zoom, ...). Implementation shall be callable from any thread, but does not have to be thread-safe (never will be executed from multiple threads at once).
params | Parameters of the render |
stats | Input-output parameter, contains run statistics that can be included in the render (run time, timestep, ...), renderers can also output some statistics of their own (time used in rendering, framerate, ...) |
Implements IRenderer.
Definition at line 54 of file IRenderer.cpp.
|
protectedpure virtual |
Rgba IRaytracer::color = Rgba::black() |
Definition at line 225 of file IRenderer.h.
Color mapping operator.
Definition at line 221 of file IRenderer.h.
struct { ... } IRaytracer::enviro |
Texture IRaytracer::hdri |
HDRI for the background. Can be empty.
Definition at line 228 of file IRenderer.h.
Size IRaytracer::iterationLimit |
Number of iterations of the progressive renderer.
Definition at line 233 of file IRenderer.h.
|
protected |
Definition at line 198 of file IRenderer.h.
|
mutableprotected |
Definition at line 212 of file IRenderer.h.
Size IRaytracer::subsampling |
Number of subsampled iterations.
Definition at line 236 of file IRenderer.h.
|
mutableprotected |
Definition at line 210 of file IRenderer.h.