SPH
Public Member Functions | List of all members
ContourRenderer Class Reference

#include <ContourRenderer.h>

Inheritance diagram for ContourRenderer:
IRenderer Polymorphic

Public Member Functions

 ContourRenderer (SharedPtr< IScheduler > scheduler, const GuiSettings &settings)
 
virtual void initialize (const Storage &storage, const IColorizer &colorizer, const ICamera &camera) override
 Prepares the objects for rendering and updates its data. More...
 
virtual bool isInitialized () const override
 Checks if the renderer has been initialized. More...
 
virtual void render (const RenderParams &params, Statistics &stats, IRenderOutput &output) const override
 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 Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Definition at line 18 of file ContourRenderer.h.

Constructor & Destructor Documentation

◆ ContourRenderer()

NAMESPACE_SPH_BEGIN ContourRenderer::ContourRenderer ( SharedPtr< IScheduler scheduler,
const GuiSettings settings 
)

Definition at line 10 of file ContourRenderer.cpp.

Member Function Documentation

◆ cancelRender()

virtual void ContourRenderer::cancelRender ( )
inlineoverridevirtual

Stops the rendering if it is currently in progress.

Implements IRenderer.

Definition at line 46 of file ContourRenderer.h.

◆ initialize()

void ContourRenderer::initialize ( const Storage storage,
const IColorizer colorizer,
const ICamera camera 
)
overridevirtual

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.

Implements IRenderer.

Definition at line 16 of file ContourRenderer.cpp.

◆ isInitialized()

bool ContourRenderer::isInitialized ( ) const
overridevirtual

Checks if the renderer has been initialized.

Implements IRenderer.

Definition at line 30 of file ContourRenderer.cpp.

◆ render()

void ContourRenderer::render ( const RenderParams params,
Statistics stats,
IRenderOutput output 
) const
overridevirtual

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, ...)
Todo:
deduplicate

Implements IRenderer.

Definition at line 75 of file ContourRenderer.cpp.

Member Data Documentation

◆ palette

Optional<Palette> ContourRenderer::palette

Definition at line 31 of file ContourRenderer.h.

◆ positions

Array<Vector> ContourRenderer::positions

Definition at line 27 of file ContourRenderer.h.

◆ values

Array<float> ContourRenderer::values

Definition at line 29 of file ContourRenderer.h.


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