A widget with a trackball iteration for a single mesh and a single light source. Extends QGLWidget class to include common methods for using Tucano this widget already has a default camera and light trackball and associated mouse methods.
More...
#include <qtflycamerawidget.hpp>
A widget with a trackball iteration for a single mesh and a single light source. Extends QGLWidget class to include common methods for using Tucano this widget already has a default camera and light trackball and associated mouse methods.
Tucano::QtFlycameraWidget::QtFlycameraWidget |
( |
QWidget * |
parent | ) |
|
|
inlineexplicit |
Default constructor.
- Parameters
-
Tucano::QtFlycameraWidget::~QtFlycameraWidget |
( |
| ) |
|
|
inline |
void Tucano::QtFlycameraWidget::initialize |
( |
void |
| ) |
|
|
inline |
Initializes the trackball and the mesh with a given filename.
virtual void Tucano::QtFlycameraWidget::initializeGL |
( |
void |
| ) |
|
|
inlinevirtual |
Initializes openGL and GLEW.
virtual void Tucano::QtFlycameraWidget::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
inlineprotectedvirtual |
Callback for key press event.
- Parameters
-
event | The key event that triggered the callback. |
void Tucano::QtFlycameraWidget::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
inlineprotected |
Callback for mouse move event.
If rotating or translating, this method updates the trackball position.
- Parameters
-
event | The mouse event that triggered the callback. |
void Tucano::QtFlycameraWidget::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
inlineprotected |
Callback for mouse press event.
The mouse press starts a rotation or a translation if Shift is pressed.
- Parameters
-
event | The mouse event that triggered the callback. |
virtual void Tucano::QtFlycameraWidget::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
inlineprotectedvirtual |
Callback for mouse release event.
Stops rotation or translation.
- Parameters
-
event | The mouse event that triggered the callback. |
Reimplemented in Tucano::QtFreecameraWidget.
virtual void Tucano::QtFlycameraWidget::openMesh |
( |
string |
filename | ) |
|
|
inlinevirtual |
Opens a mesh from file.
- Parameters
-
virtual void Tucano::QtFlycameraWidget::resizeGL |
( |
void |
| ) |
|
|
inlinevirtual |
Resize callback for the widget.
Trackball Tucano::QtFlycameraWidget::light_trackball |
|
protected |
Trackball for manipulating the light position.
Mesh Tucano::QtFlycameraWidget::mesh |
|
protected |
The documentation for this class was generated from the following file: