A widget with a trackball iteration for a single mesh and a single light source. Extends QGLWidget class to include common methods for using ShaderLib this widget already has a default camera and light trackball and associated mouse methods.
More...
#include <qttrackballwidget.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 ShaderLib this widget already has a default camera and light trackball and associated mouse methods.
Tucano::QtTrackballWidget::QtTrackballWidget |
( |
QWidget * |
parent | ) |
|
|
inlineexplicit |
Default constructor.
- Parameters
-
Tucano::QtTrackballWidget::~QtTrackballWidget |
( |
| ) |
|
|
inline |
void Tucano::QtTrackballWidget::initialize |
( |
void |
| ) |
|
|
inline |
Initializes the trackball and the mesh with a given filename.
virtual void Tucano::QtTrackballWidget::initializeGL |
( |
void |
| ) |
|
|
inlinevirtual |
Initializes openGL and GLEW.
void Tucano::QtTrackballWidget::keyPressEvent |
( |
QKeyEvent * |
event | ) |
|
|
inlineprotected |
Callback for key press event.
- Parameters
-
event | The key event that triggered the callback. |
void Tucano::QtTrackballWidget::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::QtTrackballWidget::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. |
void Tucano::QtTrackballWidget::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
inlineprotected |
Callback for mouse release event.
Stops rotation or translation.
- Parameters
-
event | The mouse event that triggered the callback. |
virtual void Tucano::QtTrackballWidget::openMesh |
( |
string |
filename | ) |
|
|
inlinevirtual |
Opens a mesh from file.
- Parameters
-
virtual void Tucano::QtTrackballWidget::resizeGL |
( |
void |
| ) |
|
|
inlinevirtual |
Resize callback for the widget.
void Tucano::QtTrackballWidget::wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
inlineprotected |
Callback for mouse wheel event.
Changes the camera zoom, or the camera FOV is Shift is pressed.
- Parameters
-
event | The mouse event that triggered the callback. |
Trackball Tucano::QtTrackballWidget::light_trackball |
|
protected |
Trackball for manipulating the light position.
Mesh Tucano::QtTrackballWidget::mesh |
|
protected |
The documentation for this class was generated from the following file: