VoxelBlur
Depth-of-field volume rendering
 All Classes Files Functions Variables Enumerations Enumerator
Public Member Functions | Private Slots | Private Attributes | List of all members
VolumeRenderWindow Class Reference

A GLWindow that uses the VolumeRenderer for drawing, and provides some interaction with it. More...

#include <volumerenderwindow.h>

Inheritance diagram for VolumeRenderWindow:
Inheritance graph
[legend]
Collaboration diagram for VolumeRenderWindow:
Collaboration graph
[legend]

Public Member Functions

 VolumeRenderWindow (VolumeRenderer *renderer, QWindow *parent=nullptr)
 Constructs a new VolumeRenderWindow. More...
 
bool initialize () override
 Calls VolumeRenderer::initialize and checks for errors.
 
void render () override
 Calls VolumeRenderer::drawCurrent.
 
VolumeRenderergetRenderer () const
 Returns the VolumeRenderer used.
 
void resizeEvent (QResizeEvent *ev) override
 Notifies the renderer that the size has changed. More...
 
void mouseMoveEvent (QMouseEvent *ev) override
 Changes the renderer rotation parameters.
 
void wheelEvent (QWheelEvent *ev) override
 
void mousePressEvent (QMouseEvent *ev) override
 Needed for mouse tracking.
 
- Public Member Functions inherited from GLWindow
 GLWindow (QWindow *parent=nullptr)
 
QWidget * createWindowContainer (QWidget *parent=nullptr, Qt::WindowFlags flags=nullptr)
 Creates a window container from this GLWindow. More...
 
bool isAnimating () const
 Gets if the window is currently in animation mode. More...
 
QSurfaceFormat format () const override
 Returns the currently used surface format. More...
 

Private Slots

void rendererWantsDraw ()
 Slot for the renderer to notify the VolumeRenderWindow of changes.
 
void rendererUpdated ()
 Slot for the renderer to notify the VolumeRenderWindow of changes.
 

Private Attributes

VolumeRendererm_renderer
 
QPoint m_lastMousePos
 

Additional Inherited Members

- Public Slots inherited from GLWindow
void setAnimating (bool animating)
 Enables/disables animation mode. More...
 
void renderLater ()
 Queues a render request using the Qt event queue, to be executed at a later time. More...
 
void renderNow ()
 Makes sure everything is correctly initialized, calls render and does buffer-swapping afterwards. More...
 
- Signals inherited from GLWindow
void initializeFailed (const QString &error)
 This signal is sent when the context creation has failed, or the initialize function returned an error. More...
 
- Protected Member Functions inherited from GLWindow
bool event (QEvent *event) override
 
void exposeEvent (QExposeEvent *event) override
 
- Protected Attributes inherited from GLWindow
bool m_error
 Set to true if error occured making rendering impossible.
 
QOpenGLContext * m_context
 The OpenGL context used for this window. More...
 

Detailed Description

A GLWindow that uses the VolumeRenderer for drawing, and provides some interaction with it.

The VolumeRenderer also defines the requested QSurfaceFormat of the window, so you don't have to set it manually.

Constructor & Destructor Documentation

VolumeRenderWindow::VolumeRenderWindow ( VolumeRenderer renderer,
QWindow *  parent = nullptr 
)
explicit

Constructs a new VolumeRenderWindow.

The supplied renderer defines the surface format used (using VolumeRenderer::getDesiredFormat).

Parameters
rendererThe VolumeRenderer to use. Must not be NULL. The window does take ownership of the renderer!
parentSee QWindow constructor.

Here is the call graph for this function:

Member Function Documentation

void VolumeRenderWindow::resizeEvent ( QResizeEvent *  ev)
override

Notifies the renderer that the size has changed.

Used for projection and glViewport.

Here is the call graph for this function:


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