Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
FilteringApp Class Referencefinal

Apply multiple image filters on an interactive rendering of a scene. More...

#include <FilteringApp.hpp>

Public Member Functions

 FilteringApp (RenderingConfig &config, Window &window)
 
void draw () override
 
void update () override
 
void physics (double fullTime, double frameTime) override
 
void resize () override
 
- Public Member Functions inherited from CameraApp
 CameraApp (RenderingConfig &config, Window &window)
 
virtual void update () override
 
virtual void physics (double fullTime, double frameTime)
 
- Public Member Functions inherited from Application
 Application (RenderingConfig &config, Window &window)
 
virtual void draw ()=0
 
virtual void update ()
 
virtual void finish ()
 
virtual void resize ()=0
 
double timeElapsed ()
 
double frameTime ()
 
double frameRate ()
 
Windowwindow ()
 
virtual ~Application ()
 
 Application (const Application &)=delete
 
Applicationoperator= (const Application &)=delete
 
 Application (Application &&)=delete
 
Applicationoperator= (Application &&)=delete
 

Private Types

enum class  Processing : int {
  INPUT = 0 , FILL , INTEGRATE , BOXBLUR ,
  GAUSSBLUR , FLOODFILL
}
 The filter to apply.
 
enum class  View : int { SCENE = 0 , IMAGE , PAINT }
 The viewing mode: either a rendering, a still image or a painting canvas.
 

Private Member Functions

void showModeOptions ()
 

Private Attributes

Texture _sceneColor
 Scene rendering color texture.
 
Texture _sceneDepth
 Scene rendering depth texture.
 
std::unique_ptr< PoissonFiller_pyramidFiller
 Poisson filling.
 
std::unique_ptr< LaplacianIntegrator_pyramidIntegrator
 Laplacian integration.
 
std::unique_ptr< GaussianBlur_gaussianBlur
 Gaussian blur processing.
 
std::unique_ptr< BoxBlur_boxBlur
 Box blur processing.
 
std::unique_ptr< FloodFiller_floodFill
 Flood filling.
 
std::unique_ptr< PaintingTool_painter
 The painting interface.
 
Program_passthrough
 Basic blit shader.
 
Program_sceneShader
 Object rendering shader.
 
const Mesh_mesh
 Basic sphere mesh.
 
Processing _mode = Processing::INPUT
 Current filter mode.
 
View _viewMode = View::SCENE
 Current view mode.
 
Texture _image = Texture("image")
 The image to display in Image view mode.
 
int _blurLevel = 3
 Gaussian blur level.
 
int _intDownscale = 1
 Integrator internal resolution downscaling.
 
int _fillDownscale = 1
 Poisson filling internal resolution downscaling.
 
bool _showProcInput = false
 Option to show the input for both convolution filters.
 

Additional Inherited Members

- Protected Member Functions inherited from CameraApp
void freezeCamera (bool shouldFreeze)
 
- Protected Attributes inherited from CameraApp
ControllableCamera _userCamera
 The interactive camera.
 
- Protected Attributes inherited from Application
RenderingConfig_config
 The current configuration.
 
std::unique_ptr< DebugViewer_debug
 Debug viewer.
 

Detailed Description

Apply multiple image filters on an interactive rendering of a scene.

Filters available: Box blur of fixed radius, Gaussian blur, Poisson filling, Laplacian integration, Flood filling.

Inherits CameraApp.

Constructor & Destructor Documentation

◆ FilteringApp()

FilteringApp::FilteringApp ( RenderingConfig config,
Window window 
)
explicit

Constructor.

Parameters
configthe configuration to apply when setting up
windowthe window to render to

Member Function Documentation

◆ draw()

void FilteringApp::draw ( )
overridevirtual

Draw call.

Implements Application.

◆ physics()

void FilteringApp::physics ( double  fullTime,
double  frameTime 
)
overridevirtual

Perform physics simulation update.

Parameters
fullTimethe time elapsed since the beginning of the render loop
frameTimethe duration of the last frame
Note
This function can be called multiple times per frame.

Reimplemented from CameraApp.

◆ resize()

void FilteringApp::resize ( )
overridevirtual

Handle a window resize event, the configuration has been updated with the new size.

Implements Application.

◆ showModeOptions()

void FilteringApp::showModeOptions ( )
private

Display mode-specific GUI options.

◆ update()

void FilteringApp::update ( )
overridevirtual

Per-frame update.

Reimplemented from CameraApp.


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