|  | anatomist
    5.1.2
    3D neuroimaging data viewer | 
Base class for OpenGL-rendering widget. More...
#include <anatomist/window/glwidgetmanager.h>


| Public Types | |
| enum | DrawMode { Normal , ZSelect , ObjectSelect , ObjectsSelect , PolygonSelect } | 
| Public Member Functions | |
| virtual QSize | sizeHint () const | 
| virtual QSize | minimumSizeHint () const | 
| virtual void | updateGL () | 
| void | renderBackBuffer (ViewState::glSelectRenderMode selectmode) | 
| void | copyBackBuffer2Texture (void) | 
| virtual void | paintScene () | 
| basically calls paintGL()  More... | |
| virtual void | initializeGL () | 
| virtual void | resizeGL (int w, int h) | 
| virtual void | paintGL () | 
| virtual void | mousePressEvent (QMouseEvent *me) | 
| virtual void | mouseReleaseEvent (QMouseEvent *me) | 
| virtual void | mouseMoveEvent (QMouseEvent *me) | 
| virtual void | mouseDoubleClickEvent (QMouseEvent *) | 
| virtual void | keyPressEvent (QKeyEvent *ev) | 
| virtual void | keyReleaseEvent (QKeyEvent *ev) | 
| virtual void | focusInEvent (QFocusEvent *) | 
| virtual void | focusOutEvent (QFocusEvent *) | 
| virtual void | wheelEvent (QWheelEvent *) | 
| GLWidgetManager (anatomist::AWindow *win, QGLWidget *widget) | |
| virtual | ~GLWidgetManager () | 
| QGLWidget * | qglWidget () | 
| QObject * | qobject () | 
| this QObject is used for slots: updateZBuffer, saveContents, recordStart, recordStop  More... | |
| void | setPrimitives (const anatomist::GLPrimitives &li) | 
| anatomist::GLPrimitives | primitives () const | 
| void | setSelectionPrimitives (const anatomist::GLPrimitives &li) | 
| anatomist::GLPrimitives | selectionPrimitives () const | 
| void | clearLists () | 
| void | setExtrema (const Point3df &bmin, const Point3df &bmax) | 
| set objects extrema, this also automatically sets the window bounding box  More... | |
| void | setWindowExtrema (const Point3df &bmin, const Point3df &bmax) | 
| set window extrema (in the local orientation)  More... | |
| Point3df | boundingMin () const | 
| Point3df | boundingMax () const | 
| Point3df | windowBoundingMin () const | 
| Point3df | windowBoundingMax () const | 
| void | setLightGLList (GLuint l) | 
| GLuint | lightGLList () const | 
| void | setPreferredSize (int, int) | 
| void | setMinimumSizeHint (const QSize &) | 
| virtual bool | positionFromCursor (int x, int y, Point3df &position) | 
| virtual bool | cursorFromPosition (const Point3df &position, Point3df &cursor) | 
| virtual Point3df | objectPositionFromWindow (const Point3df &winpos) | 
| virtual void | readBackBuffer (int x, int y, GLubyte &red, GLubyte &green, GLubyte &blue) | 
| GLubyte * | getTextureFromBackBuffer () | 
| virtual bool | translateCursorPosition (float x, float y, Point3df &position) | 
| virtual std::string | name () const | 
| void | setZoom (float z) | 
| float | zoom () const | 
| const aims::Quaternion & | quaternion () const | 
| The quaternion rotates the initial eye direction (0, 0, 1) into the view coordinates, before Z axis inversion.  More... | |
| void | setQuaternion (const Point4df &q) | 
| void | setQuaternion (const aims::Quaternion &q) | 
| const float * | rotation () const | 
| void | setXDirection (bool invert) | 
| void | setYDirection (bool invert) | 
| void | setZDirection (bool invert) | 
| bool | invertedX () const | 
| bool | invertedY () const | 
| bool | invertedZ () const | 
| void | setRotationCenter (const Point3df &) | 
| Point3df | rotationCenter () const | 
| bool | perspectiveEnabled () const | 
| void | enablePerspective (bool) | 
| float | perspectiveAngle () const | 
| void | setPerspectiveAngle (float a) | 
| bool | perspectiveAutoFarPlane () const | 
| void | setPerspectiveAutoFarPlane (bool x) | 
| float | perspectiveFarPlane () const | 
| void | setPerspectiveFarPlane (float d) | 
| float | perspectiveNearPlane () const | 
| float | perspectiveNearPlaneRatio () const | 
| void | setPerspectiveNearPlaneRatio (float d) | 
| void | setAutoCentering (bool) | 
| bool | autoCentering () const | 
| virtual void | recordStart (const QString &basename, const QString &format=QString(), int width=0, int height=0) | 
| void | saveContents (const QString &filename, const QString &format, int width=0, int height=0) | 
| QImage | snapshotImage (int bufmode, int width=0, int height=0) | 
| void | saveOtherBuffer (const QString &filename, const QString &format, int mode, int width=0, int height=0) | 
| void | setOtherBuffersSaveMode (int mode) | 
| int | otherBuffersSaveMode () const | 
| bool | hasTransparentObjects () const | 
| void | setTransparentObjects (bool) | 
| bool | depthPeelingAllowed () const | 
| bool | depthPeelingEnabled () const | 
| void | enableDepthPeeling (bool) | 
| unsigned | depthPeelingPasses () const | 
| void | setDepthPeelingPasses (unsigned n) | 
| unsigned | numTextureUnits () const | 
| bool | recording () const | 
| void | setBackgroundAlpha (float a) | 
| GLWidgetManager * | rightEye () | 
| GLWidgetManager * | leftEye () | 
| void | setRightEye (GLWidgetManager *) | 
| void | setLeftEye (GLWidgetManager *) | 
| AWindow * | aWindow () | 
| const AWindow * | aWindow () const | 
| virtual int | width ()=0 | 
| virtual int | height ()=0 | 
| virtual void | saveContents () | 
| void | saveContentsWithCustomSize () | 
| virtual void | recordStart () | 
| void | recordStartWithCustomSize () | 
| virtual void | recordStop () | 
| bool | hasCameraChanged () const | 
| void | bindOtherFramebuffer (DrawMode m) | 
| void | restoreFramebuffer () | 
| void | resizeOtherFramebuffers (int w, int h) | 
|  Public Member Functions inherited from anatomist::View | |
| View (AWindow *win) | |
| virtual | ~View () | 
| ControlSwitch * | controlSwitch () | 
| Static Public Member Functions | |
| static QGLWidget * | sharedWidget () | 
| Protected Member Functions | |
| virtual void | project (int virtualWidth=0, int virtualHeight=0) | 
| virtual void | setupView (int virtualWidth=0, int virtualHeight=0) | 
| void | drawObjects (DrawMode m=Normal) | 
| void | depthPeelingRender (DrawMode m=Normal) | 
| virtual void | paintGL (DrawMode m, int virtualWidth=0, int virtualHeight=0) | 
| Virtual width and height are used to perform off-screen rendering.  More... | |
| void | record () | 
| virtual void | updateZBuffer () | 
| bool | isZBufferUpToDate () const | 
| void | setZBufferUpdated (bool) | 
| void | stopZBufferTimer () | 
| bool | isRGBBufferUpToDate () const | 
| void | setRGBBufferUpdated (bool) | 
| Protected Attributes | |
| anatomist::GLPrimitives | _primitives | 
| anatomist::GLPrimitives | _selectprimitives | 
| Friends | |
| class | ::GLWidgetManager_Private_QObject | 
| class | anatomist::internal::AGraphicsView | 
| QGraphicsView needs to call event methods.  More... | |
Base class for OpenGL-rendering widget.
Actually this is not a QWidget (or a QGLWidget) since in some cases we need to separate this implementation from the actual Qt widget which can be an inherited one.
Definition at line 76 of file glwidgetmanager.h.
| Enumerator | |
|---|---|
| Normal | |
| ZSelect | |
| ObjectSelect | |
| ObjectsSelect | |
| PolygonSelect | |
Definition at line 79 of file glwidgetmanager.h.
| anatomist::GLWidgetManager::GLWidgetManager | ( | anatomist::AWindow * | win, | 
| QGLWidget * | widget | ||
| ) | 
| 
 | virtual | 
| bool anatomist::GLWidgetManager::autoCentering | ( | ) | const | 
| 
 | virtual | 
Reimplemented from anatomist::View.
| 
 | virtual | 
Reimplemented from anatomist::View.
| void anatomist::GLWidgetManager::bindOtherFramebuffer | ( | DrawMode | m | ) | 
| Point3df anatomist::GLWidgetManager::boundingMax | ( | ) | const | 
| Point3df anatomist::GLWidgetManager::boundingMin | ( | ) | const | 
| void anatomist::GLWidgetManager::clearLists | ( | ) | 
| void anatomist::GLWidgetManager::copyBackBuffer2Texture | ( | void | ) | 
| 
 | virtual | 
| bool anatomist::GLWidgetManager::depthPeelingAllowed | ( | ) | const | 
| bool anatomist::GLWidgetManager::depthPeelingEnabled | ( | ) | const | 
| unsigned anatomist::GLWidgetManager::depthPeelingPasses | ( | ) | const | 
| void anatomist::GLWidgetManager::enableDepthPeeling | ( | bool | ) | 
| void anatomist::GLWidgetManager::enablePerspective | ( | bool | ) | 
| 
 | virtual | 
Reimplemented in QAGLWidget.
| 
 | virtual | 
Reimplemented in QAGLWidget.
| GLubyte* anatomist::GLWidgetManager::getTextureFromBackBuffer | ( | ) | 
| bool anatomist::GLWidgetManager::hasCameraChanged | ( | ) | const | 
| bool anatomist::GLWidgetManager::hasTransparentObjects | ( | ) | const | 
| 
 | pure virtual | 
Implemented in QAGLWidget.
| 
 | virtual | 
Reimplemented in QAGLWidget.
| bool anatomist::GLWidgetManager::invertedX | ( | ) | const | 
| bool anatomist::GLWidgetManager::invertedY | ( | ) | const | 
| bool anatomist::GLWidgetManager::invertedZ | ( | ) | const | 
| 
 | protected | 
| 
 | protected | 
| 
 | virtual | 
Reimplemented in QAGLWidget.
| 
 | virtual | 
Reimplemented in QAGLWidget.
| GLWidgetManager* anatomist::GLWidgetManager::leftEye | ( | ) | 
| GLuint anatomist::GLWidgetManager::lightGLList | ( | ) | const | 
| 
 | virtual | 
Reimplemented in QAGLWidget.
| 
 | virtual | 
Reimplemented in QAGLWidget.
| 
 | virtual | 
Reimplemented in QAGLWidget.
| 
 | virtual | 
Reimplemented in QAGLWidget.
| 
 | virtual | 
Reimplemented in QAGLWidget.
| 
 | virtual | 
Implements anatomist::View.
Reimplemented in QAGLWidget3D, and QAGLWidget.
| unsigned anatomist::GLWidgetManager::numTextureUnits | ( | ) | const | 
| 
 | virtual | 
| int anatomist::GLWidgetManager::otherBuffersSaveMode | ( | ) | const | 
| 
 | virtual | 
Reimplemented in QAGLWidget.
| 
 | protectedvirtual | 
Virtual width and height are used to perform off-screen rendering.
They are used only in the context of a framebuffer.
| 
 | virtual | 
basically calls paintGL()
| float anatomist::GLWidgetManager::perspectiveAngle | ( | ) | const | 
| bool anatomist::GLWidgetManager::perspectiveAutoFarPlane | ( | ) | const | 
| bool anatomist::GLWidgetManager::perspectiveEnabled | ( | ) | const | 
| float anatomist::GLWidgetManager::perspectiveFarPlane | ( | ) | const | 
| float anatomist::GLWidgetManager::perspectiveNearPlane | ( | ) | const | 
| float anatomist::GLWidgetManager::perspectiveNearPlaneRatio | ( | ) | const | 
| 
 | virtual | 
| anatomist::GLPrimitives anatomist::GLWidgetManager::primitives | ( | ) | const | 
| 
 | protectedvirtual | 
| QGLWidget* anatomist::GLWidgetManager::qglWidget | ( | ) | 
| QObject* anatomist::GLWidgetManager::qobject | ( | ) | 
this QObject is used for slots: updateZBuffer, saveContents, recordStart, recordStop
| const aims::Quaternion& anatomist::GLWidgetManager::quaternion | ( | ) | const | 
The quaternion rotates the initial eye direction (0, 0, 1) into the view coordinates, before Z axis inversion.
| 
 | virtual | 
| 
 | protected | 
| bool anatomist::GLWidgetManager::recording | ( | ) | const | 
| 
 | virtual | 
| 
 | virtual | 
| void anatomist::GLWidgetManager::recordStartWithCustomSize | ( | ) | 
| 
 | virtual | 
| void anatomist::GLWidgetManager::renderBackBuffer | ( | ViewState::glSelectRenderMode | selectmode | ) | 
| 
 | virtual | 
Reimplemented in QAGLWidget.
| void anatomist::GLWidgetManager::resizeOtherFramebuffers | ( | int | w, | 
| int | h | ||
| ) | 
| void anatomist::GLWidgetManager::restoreFramebuffer | ( | ) | 
| GLWidgetManager* anatomist::GLWidgetManager::rightEye | ( | ) | 
| const float* anatomist::GLWidgetManager::rotation | ( | ) | const | 
| Point3df anatomist::GLWidgetManager::rotationCenter | ( | ) | const | 
| 
 | virtual | 
| void anatomist::GLWidgetManager::saveContents | ( | const QString & | filename, | 
| const QString & | format, | ||
| int | width = 0, | ||
| int | height = 0 | ||
| ) | 
| void anatomist::GLWidgetManager::saveContentsWithCustomSize | ( | ) | 
| void anatomist::GLWidgetManager::saveOtherBuffer | ( | const QString & | filename, | 
| const QString & | format, | ||
| int | mode, | ||
| int | width = 0, | ||
| int | height = 0 | ||
| ) | 
| anatomist::GLPrimitives anatomist::GLWidgetManager::selectionPrimitives | ( | ) | const | 
| void anatomist::GLWidgetManager::setAutoCentering | ( | bool | ) | 
| void anatomist::GLWidgetManager::setBackgroundAlpha | ( | float | a | ) | 
| void anatomist::GLWidgetManager::setDepthPeelingPasses | ( | unsigned | n | ) | 
set objects extrema, this also automatically sets the window bounding box
| void anatomist::GLWidgetManager::setLeftEye | ( | GLWidgetManager * | ) | 
| void anatomist::GLWidgetManager::setLightGLList | ( | GLuint | l | ) | 
| void anatomist::GLWidgetManager::setMinimumSizeHint | ( | const QSize & | ) | 
| void anatomist::GLWidgetManager::setOtherBuffersSaveMode | ( | int | mode | ) | 
| void anatomist::GLWidgetManager::setPerspectiveAngle | ( | float | a | ) | 
| void anatomist::GLWidgetManager::setPerspectiveAutoFarPlane | ( | bool | x | ) | 
| void anatomist::GLWidgetManager::setPerspectiveFarPlane | ( | float | d | ) | 
| void anatomist::GLWidgetManager::setPerspectiveNearPlaneRatio | ( | float | d | ) | 
| void anatomist::GLWidgetManager::setPreferredSize | ( | int | , | 
| int | |||
| ) | 
| void anatomist::GLWidgetManager::setPrimitives | ( | const anatomist::GLPrimitives & | li | ) | 
| void anatomist::GLWidgetManager::setQuaternion | ( | const aims::Quaternion & | q | ) | 
| void anatomist::GLWidgetManager::setQuaternion | ( | const Point4df & | q | ) | 
| 
 | protected | 
| void anatomist::GLWidgetManager::setRightEye | ( | GLWidgetManager * | ) | 
| void anatomist::GLWidgetManager::setRotationCenter | ( | const Point3df & | ) | 
| void anatomist::GLWidgetManager::setSelectionPrimitives | ( | const anatomist::GLPrimitives & | li | ) | 
| void anatomist::GLWidgetManager::setTransparentObjects | ( | bool | ) | 
| 
 | protectedvirtual | 
set window extrema (in the local orientation)
| void anatomist::GLWidgetManager::setXDirection | ( | bool | invert | ) | 
| void anatomist::GLWidgetManager::setYDirection | ( | bool | invert | ) | 
| 
 | protected | 
| void anatomist::GLWidgetManager::setZDirection | ( | bool | invert | ) | 
| void anatomist::GLWidgetManager::setZoom | ( | float | z | ) | 
| 
 | static | 
| 
 | virtual | 
Reimplemented in QAGLWidget.
| QImage anatomist::GLWidgetManager::snapshotImage | ( | int | bufmode, | 
| int | width = 0, | ||
| int | height = 0 | ||
| ) | 
| 
 | protected | 
| 
 | virtual | 
| 
 | virtual | 
| 
 | protectedvirtual | 
| 
 | virtual | 
Reimplemented in QAGLWidget.
| 
 | pure virtual | 
Implemented in QAGLWidget.
| Point3df anatomist::GLWidgetManager::windowBoundingMax | ( | ) | const | 
| Point3df anatomist::GLWidgetManager::windowBoundingMin | ( | ) | const | 
| float anatomist::GLWidgetManager::zoom | ( | ) | const | 
| 
 | friend | 
Definition at line 116 of file glwidgetmanager.h.
| 
 | friend | 
QGraphicsView needs to call event methods.
Definition at line 244 of file glwidgetmanager.h.
| 
 | protected | 
Definition at line 257 of file glwidgetmanager.h.
| 
 | protected | 
Definition at line 258 of file glwidgetmanager.h.