Illustrative Line Visualization
Implementation of the method by Everts et al. for visualizing dense line data.
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
GLWidget Class Reference

Widget encapsulating the OpenGL context. More...

#include <glwidget.h>

Inheritance diagram for GLWidget:

Public Slots

virtual void setWireframe (bool enabled)
 Enables / disables wireframe mode. More...
 
virtual void setThickness (int p_thickness)
 Sets the line thickness value. More...
 
virtual void setHalo (int p_halo)
 Sets the halo width value. More...
 
virtual void setStripDepth (int p_stripDepth)
 Sets the strip depth value. More...
 
virtual void setDepthCueing (int p_depthCueing)
 sets the depth cueing value More...
 

Signals

void frameRate (int fps)
 Signals the current frames per second periodically. More...
 

Public Member Functions

 GLWidget (QWidget *parent=Q_NULLPTR, int updateRate=60, bool sampleShading=true, int anisotropy=1)
 Constructs a new OpenGL widget. More...
 
virtual void setTrackData (const QVector< Track > &&tracks)
 Prepares track data for rendering. More...
 

Protected Slots

virtual void updateFrame ()
 Updates the scene. More...
 
virtual void paintGL () Q_DECL_OVERRIDE
 Renders the scene. More...
 
virtual void initializeGL () Q_DECL_OVERRIDE
 Initializes everything related to OpenGL. More...
 
virtual void resizeGL (int w, int h) Q_DECL_OVERRIDE
 Handles resizing of the widget. More...
 

Protected Member Functions

void keyPressEvent (QKeyEvent *event) Q_DECL_OVERRIDE
 Handles key presses for toggling track filtering. More...
 
void mousePressEvent (QMouseEvent *event) override
 Handles mouse click interaction for camera movement. More...
 
void mouseMoveEvent (QMouseEvent *event) override
 Handles mouse movement interaction for camera movement. More...
 
void wheelEvent (QWheelEvent *event) Q_DECL_OVERRIDE
 Handles mouse wheel interaction for camera movement. More...
 

Detailed Description

Widget encapsulating the OpenGL context.

Constructor & Destructor Documentation

◆ GLWidget()

GLWidget::GLWidget ( QWidget *  parent = Q_NULLPTR,
int  updateRate = 60,
bool  sampleShading = true,
int  anisotropy = 1 
)

Constructs a new OpenGL widget.

Parameters
parentthe parent widget.
updateRatethe update rate of the widget.
sampleShadingindicates if sample shading is to be used.
anisotropythe maximum number of samples used for anisotropic filtering.

Member Function Documentation

◆ frameRate

void GLWidget::frameRate ( int  fps)
signal

Signals the current frames per second periodically.

Parameters
fpsthe current frames per second.

◆ initializeGL

void GLWidget::initializeGL ( )
protectedvirtualslot

Initializes everything related to OpenGL.

This function is called after the context has been created, before the first invocation of initializeGL() and resizeGL()

◆ keyPressEvent()

void GLWidget::keyPressEvent ( QKeyEvent *  event)
protected

Handles key presses for toggling track filtering.

Parameters
eventthe key event.

◆ mouseMoveEvent()

void GLWidget::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected

Handles mouse movement interaction for camera movement.

Parameters
eventthe mouse event

◆ mousePressEvent()

void GLWidget::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Handles mouse click interaction for camera movement.

Parameters
eventthe mouse event

◆ paintGL

void GLWidget::paintGL ( )
protectedvirtualslot

Renders the scene.

This function is called whenever the widget needs to be updated (e.g. resizing), as well as at a fixed interval.

◆ resizeGL

void GLWidget::resizeGL ( int  w,
int  h 
)
protectedvirtualslot

Handles resizing of the widget.

Parameters
wthe new width.
hthe new height.

This function is called whenever the widget is resized (e.g. user input).

◆ setDepthCueing

virtual void GLWidget::setDepthCueing ( int  p_depthCueing)
inlinevirtualslot

sets the depth cueing value

Parameters
p_depthCueingthe value

◆ setHalo

virtual void GLWidget::setHalo ( int  p_halo)
inlinevirtualslot

Sets the halo width value.

Parameters
p_halothe value

◆ setStripDepth

virtual void GLWidget::setStripDepth ( int  p_stripDepth)
inlinevirtualslot

Sets the strip depth value.

Parameters
p_stripDepththe value

◆ setThickness

virtual void GLWidget::setThickness ( int  p_thickness)
inlinevirtualslot

Sets the line thickness value.

Parameters
p_thicknessthe value

◆ setTrackData()

void GLWidget::setTrackData ( const QVector< Track > &&  tracks)
virtual

Prepares track data for rendering.

Parameters
tracksthe track data.

◆ setWireframe

virtual void GLWidget::setWireframe ( bool  enabled)
inlinevirtualslot

Enables / disables wireframe mode.

Parameters
enabledtrue for wireframe rendering, false for solid shading.

◆ updateFrame

void GLWidget::updateFrame ( )
protectedvirtualslot

Updates the scene.

This function is called at a fixed interval, which is determined in the constructor. Here everything related to updating the scene should

◆ wheelEvent()

void GLWidget::wheelEvent ( QWheelEvent *  event)
protected

Handles mouse wheel interaction for camera movement.

Parameters
eventthe wheel event.

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