SPH
Public Member Functions | List of all members
IRenderer Class Referenceabstract

Interface used to implement renderers. More...

#include <IRenderer.h>

Inheritance diagram for IRenderer:
Polymorphic ContourRenderer IRaytracer MeshRenderer ParticleRenderer RayMarcher VolumeRenderer

Public Member Functions

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 void render (const RenderParams &params, Statistics &stats, IRenderOutput &output) const =0
 Draws particles into the bitmap, given the data provided in initialize. More...
 
virtual void cancelRender ()=0
 Stops the rendering if it is currently in progress. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Interface used to implement renderers.

Definition at line 166 of file IRenderer.h.

Member Function Documentation

◆ cancelRender()

virtual void IRenderer::cancelRender ( )
pure virtual

Stops the rendering if it is currently in progress.

Implemented in ParticleRenderer, MeshRenderer, IRaytracer, and ContourRenderer.

◆ initialize()

virtual void IRenderer::initialize ( const Storage storage,
const IColorizer colorizer,
const ICamera camera 
)
pure virtual

Prepares the objects for rendering and updates its data.

Called every time a parameter changes. Renderer should cache any data necessary for rendering of particles (particle positions, colors, etc.).

Parameters
storageStorage containing positions of particles, must match the particles in colorizer.
colorizerData-to-color conversion object for particles. Must be already initialized!
cameraCamera used for rendering.

Implemented in VolumeRenderer, RayMarcher, ParticleRenderer, MeshRenderer, and ContourRenderer.

◆ isInitialized()

virtual bool IRenderer::isInitialized ( ) const
pure virtual

Checks if the renderer has been initialized.

Implemented in VolumeRenderer, RayMarcher, ParticleRenderer, MeshRenderer, and ContourRenderer.

◆ render()

virtual void IRenderer::render ( const RenderParams params,
Statistics stats,
IRenderOutput output 
) const
pure virtual

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, ...)

Implemented in ParticleRenderer, MeshRenderer, ContourRenderer, and IRaytracer.


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