Widget encapsulating the OpenGL context.
More...
#include <glwidget.h>
|
void | frameRate (int fps) |
| Signals the current frames per second periodically. More...
|
|
|
| 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...
|
|
|
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...
|
|
Widget encapsulating the OpenGL context.
◆ GLWidget()
GLWidget::GLWidget |
( |
QWidget * |
parent = Q_NULLPTR , |
|
|
int |
updateRate = 60 , |
|
|
bool |
sampleShading = true , |
|
|
int |
anisotropy = 1 |
|
) |
| |
Constructs a new OpenGL widget.
- Parameters
-
parent | the parent widget. |
updateRate | the update rate of the widget. |
sampleShading | indicates if sample shading is to be used. |
anisotropy | the maximum number of samples used for anisotropic filtering. |
◆ frameRate
void GLWidget::frameRate |
( |
int |
fps | ) |
|
|
signal |
Signals the current frames per second periodically.
- Parameters
-
fps | the 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
-
◆ mouseMoveEvent()
void GLWidget::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Handles mouse movement interaction for camera movement.
- Parameters
-
◆ mousePressEvent()
void GLWidget::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
Handles mouse click interaction for camera movement.
- Parameters
-
◆ 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
-
w | the new width. |
h | the 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
-
◆ setHalo
virtual void GLWidget::setHalo |
( |
int |
p_halo | ) |
|
|
inlinevirtualslot |
Sets the halo width value.
- Parameters
-
◆ setStripDepth
virtual void GLWidget::setStripDepth |
( |
int |
p_stripDepth | ) |
|
|
inlinevirtualslot |
Sets the strip depth value.
- Parameters
-
◆ setThickness
virtual void GLWidget::setThickness |
( |
int |
p_thickness | ) |
|
|
inlinevirtualslot |
Sets the line thickness value.
- Parameters
-
◆ setTrackData()
void GLWidget::setTrackData |
( |
const QVector< Track > && |
tracks | ) |
|
|
virtual |
Prepares track data for rendering.
- Parameters
-
◆ setWireframe
virtual void GLWidget::setWireframe |
( |
bool |
enabled | ) |
|
|
inlinevirtualslot |
Enables / disables wireframe mode.
- Parameters
-
enabled | true 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
-
The documentation for this class was generated from the following files: