Visualisierung 2
Comparison of Hue Preserving Rendering to Alpha Composing
GLRenderWidget Class Reference

The GLRenderWidget class implementing additional OpenGL capabilities on a QWidget. More...

#include <GLRenderWidget.h>

Inheritance diagram for GLRenderWidget:

Public Member Functions

 GLRenderWidget (QWidget *parent)
 
 ~GLRenderWidget ()
 
void setShader (const std::string &vert, const std::string &frag)
 setShader sets the shader to be used for rendering. More...
 
void setRenderObject (RenderData &data)
 setRenderObject sets vertex positions and indices of the rendered quad. More...
 
void setVolumeTexture (QOpenGLTexture *volume3Dtex)
 setVolumeTexture sets the volume that should be rendered in this window. More...
 
void setRegion (float sep, QColor c1, QColor c2)
 setRegion sets the transfer function parameters for this rendering window. More...
 
void setOrientation (int ori)
 setOrientation sets the orientation parameter for this rendering window. More...
 

Protected Member Functions

void initializeGL ()
 initializeGL performs openGL setup. More...
 
void resizeGL (int width, int height)
 resizeGL handles resize events More...
 
void paintGL ()
 paintGL passes unfiroms to shader program and renders volume into GUI window. More...
 

Protected Attributes

QOpenGLShaderProgram * shader
 
RenderData objectData
 
QOpenGLVertexArrayObject vao
 
QOpenGLBuffer vbo
 
QOpenGLBuffer indices
 
QOpenGLDebugLogger * logger
 

Detailed Description

The GLRenderWidget class implementing additional OpenGL capabilities on a QWidget.

Controller class for GUI rendering windows.

Author
Julian Strohmayer 01426125 e1426.nosp@m.125@.nosp@m.stude.nosp@m.nt.t.nosp@m.uwien.nosp@m..ac..nosp@m.at
Patrick Gantner 01576033 e1576.nosp@m.033@.nosp@m.stude.nosp@m.nt.t.nosp@m.uwien.nosp@m..ac..nosp@m.at
Date
05.06.2018

Definition at line 31 of file GLRenderWidget.h.

Constructor & Destructor Documentation

◆ GLRenderWidget()

GLRenderWidget::GLRenderWidget ( QWidget *  parent)

Controller class for GUI rendering windows.

Author
Julian Strohmayer 01426125 e1426.nosp@m.125@.nosp@m.stude.nosp@m.nt.t.nosp@m.uwien.nosp@m..ac..nosp@m.at
Patrick Gantner 01576033 e1576.nosp@m.033@.nosp@m.stude.nosp@m.nt.t.nosp@m.uwien.nosp@m..ac..nosp@m.at
Date
05.06.2018

Definition at line 16 of file GLRenderWidget.cpp.

◆ ~GLRenderWidget()

GLRenderWidget::~GLRenderWidget ( )

Definition at line 29 of file GLRenderWidget.cpp.

Member Function Documentation

◆ initializeGL()

void GLRenderWidget::initializeGL ( )
protected

initializeGL performs openGL setup.

Definition at line 33 of file GLRenderWidget.cpp.

◆ paintGL()

void GLRenderWidget::paintGL ( )
protected

paintGL passes unfiroms to shader program and renders volume into GUI window.

Definition at line 57 of file GLRenderWidget.cpp.

◆ resizeGL()

void GLRenderWidget::resizeGL ( int  width,
int  height 
)
protected

resizeGL handles resize events

Parameters
widthopenGL viewport width
heightopenGL viewport height

Definition at line 53 of file GLRenderWidget.cpp.

◆ setOrientation()

void GLRenderWidget::setOrientation ( int  ori)

setOrientation sets the orientation parameter for this rendering window.

Parameters
oriDirection number (0..top, 1..bottom, 2..left, 3..right, 4..front, 5..back)

Definition at line 92 of file GLRenderWidget.cpp.

◆ setRegion()

void GLRenderWidget::setRegion ( float  sep,
QColor  c1,
QColor  c2 
)

setRegion sets the transfer function parameters for this rendering window.

Parameters
sepregion seperator value (0,1)
c1color of the lower region (less dense)
c2color of the upper region (more dense)

Definition at line 174 of file GLRenderWidget.cpp.

◆ setRenderObject()

void GLRenderWidget::setRenderObject ( RenderData data)

setRenderObject sets vertex positions and indices of the rendered quad.

Parameters
datavertex positions and indices

Definition at line 87 of file GLRenderWidget.cpp.

◆ setShader()

void GLRenderWidget::setShader ( const std::string &  vert,
const std::string &  frag 
)

setShader sets the shader to be used for rendering.

Parameters
vertlocation of vertex shader file
fraglocation of fragment shader file

Definition at line 96 of file GLRenderWidget.cpp.

◆ setVolumeTexture()

void GLRenderWidget::setVolumeTexture ( QOpenGLTexture *  volume3Dtex)

setVolumeTexture sets the volume that should be rendered in this window.

Parameters
volume3Dtexvolume as 3D texture

Definition at line 170 of file GLRenderWidget.cpp.

Member Data Documentation

◆ indices

QOpenGLBuffer GLRenderWidget::indices
protected

Definition at line 77 of file GLRenderWidget.h.

◆ logger

QOpenGLDebugLogger* GLRenderWidget::logger
protected

Definition at line 95 of file GLRenderWidget.h.

◆ objectData

RenderData GLRenderWidget::objectData
protected

Definition at line 73 of file GLRenderWidget.h.

◆ shader

QOpenGLShaderProgram* GLRenderWidget::shader
protected

Definition at line 72 of file GLRenderWidget.h.

◆ vao

QOpenGLVertexArrayObject GLRenderWidget::vao
protected

Definition at line 75 of file GLRenderWidget.h.

◆ vbo

QOpenGLBuffer GLRenderWidget::vbo
protected

Definition at line 76 of file GLRenderWidget.h.


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