SPH
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IRaytracer Class Referenceabstract

Base class for renderers based on raytracing. More...

#include <IRenderer.h>

Inheritance diagram for IRaytracer:
IRenderer Polymorphic RayMarcher VolumeRenderer

Classes

struct  ThreadData
 

Public Member Functions

 IRaytracer (SharedPtr< IScheduler > scheduler, const GuiSettings &gui)
 
virtual void render (const RenderParams &params, 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...
 
- Public Member Functions inherited from IRenderer
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...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Protected Member Functions

virtual Rgba shade (const RenderParams &params, const CameraRay &ray, ThreadData &data) const =0
 
Rgba getEnviroColor (const CameraRay &ray) const
 

Protected Attributes

SharedPtr< ISchedulerscheduler
 
ThreadLocal< ThreadDatathreadData
 
std::atomic_bool shouldContinue
 

Detailed Description

Base class for renderers based on raytracing.

Definition at line 196 of file IRenderer.h.

Constructor & Destructor Documentation

◆ IRaytracer()

IRaytracer::IRaytracer ( SharedPtr< IScheduler scheduler,
const GuiSettings gui 
)

Definition at line 38 of file IRenderer.cpp.

Member Function Documentation

◆ cancelRender()

virtual void IRaytracer::cancelRender ( )
inlineoverridevirtual

Stops the rendering if it is currently in progress.

Implements IRenderer.

Definition at line 245 of file IRenderer.h.

◆ getEnviroColor()

Rgba IRaytracer::getEnviroColor ( const CameraRay ray) const
protected
Todo:
deduplicate with setupUvws

Definition at line 149 of file IRenderer.cpp.

◆ render()

void IRaytracer::render ( const RenderParams params,
Statistics stats,
IRenderOutput output 
) const
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).

Parameters
paramsParameters of the render
statsInput-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.

◆ shade()

virtual Rgba IRaytracer::shade ( const RenderParams params,
const CameraRay ray,
ThreadData data 
) const
protectedpure virtual

Member Data Documentation

◆ color

Rgba IRaytracer::color = Rgba::black()

Definition at line 225 of file IRenderer.h.

◆ colorMap

AutoPtr<IColorMap> IRaytracer::colorMap

Color mapping operator.

Definition at line 221 of file IRenderer.h.

◆ 

struct { ... } IRaytracer::enviro

◆ hdri

Texture IRaytracer::hdri

HDRI for the background. Can be empty.

Definition at line 228 of file IRenderer.h.

◆ iterationLimit

Size IRaytracer::iterationLimit

Number of iterations of the progressive renderer.

Definition at line 233 of file IRenderer.h.

◆ scheduler

SharedPtr<IScheduler> IRaytracer::scheduler
protected

Definition at line 198 of file IRenderer.h.

◆ shouldContinue

std::atomic_bool IRaytracer::shouldContinue
mutableprotected

Definition at line 212 of file IRenderer.h.

◆ subsampling

Size IRaytracer::subsampling

Number of subsampled iterations.

Definition at line 236 of file IRenderer.h.

◆ threadData

ThreadLocal<ThreadData> IRaytracer::threadData
mutableprotected

Definition at line 210 of file IRenderer.h.


The documentation for this class was generated from the following files: