glViewer Class Reference

#include <OpenFlipper/widgets/glWidget/QtBaseViewer.hh>

Collaboration diagram for glViewer:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ProjectionMode { ORTHOGRAPHIC_PROJECTION, PERSPECTIVE_PROJECTION }
 

projection mode

More...
enum  NavigationMode { NORMAL_NAVIGATION, FIRSTPERSON_NAVIGATION }
 

Navigation mode.

More...
enum  NormalsMode { DONT_TOUCH_NORMALS, NORMALIZE_NORMALS }
 

Automatically normalize normals?

More...

Public Slots

virtual void updateGL ()
 Redraw scene. Triggers paint event for updating the view (cf. drawNow()).
virtual void setHome ()
 set home position
virtual void home ()
 go to home pos
virtual void viewAll ()
 view the whole scene
virtual void flyTo (const QPoint &_pos, bool _move_back)
 Fly to. Get closer if _move_back=false, get more distant else.
virtual void flyTo (const QPoint &_pos)
 Fly to, get closer.
virtual void flyFrom (const QPoint &_pos)
 Fly to, get more distant.
virtual void flyTo (const ACG::Vec3d &_position, const ACG::Vec3d &_center, double _time=1000.0)
virtual void perspectiveProjection ()
 set perspective view (projectionMode(PERSPECTIVE_PROJECTION))
virtual void orthographicProjection ()
 set orthographic view (projectionMode(ORTHOGRAPHIC_PROJECTION))
virtual void toggleProjectionMode ()
 toggle projection mode
virtual void toggleNavigationMode ()
 toggle navigation mode
virtual void setView (const ACG::GLMatrixd &_modelview, const ACG::GLMatrixd &_inverse_modelview)
 set view, used for synchronizing
void actionPasteView ()
void actionCopyView ()
Snapshots

virtual void snapshot ()
virtual void snapshot (QImage &_image, bool _offScreenRendering=false)
 Take a snapshot and store it in the given image.

Signals

void functionMenuUpdate ()
void statusMessage (const QString &message, int timeout=0)
void projectionModeChanged (bool _ortho)
void navigationModeChanged (bool _normal)
void signalMouseEvent (QMouseEvent *, const std::string &)
void signalMouseEvent (QMouseEvent *)
 This signal does not send the pick mode and is kept for compatibility.
void signalWheelEvent (QWheelEvent *, const std::string &)
 Emitted in Pick mode. Uses pick mode.
void signalMouseEventIdentify (QMouseEvent *)
void signalSceneGraphChanged (ACG::SceneGraph::BaseNode *_root)
 scene graph has changed
void signalMouseEventClick (QMouseEvent *, bool _double)
void signalCustomContextMenuRequested (const QPoint &)
view handling

void viewUpdated ()
 This signal is emitted when the scene is repainted due to any event.
void viewChanged ()
 This signal is emitted whenever the view is changed by the user.
void signalMakeActive ()
 make this widget active

Public Member Functions

 glViewer (QGraphicsScene *_scene, QGLWidget *_glWidget, Viewer::ViewerProperties &_properties, QGraphicsWidget *_parent=0)
virtual ~glViewer ()
 Destructor.
virtual QSize sizeHint () const
virtual void makeCurrent ()
 Makes this widget the current widget for OpenGL operations.
virtual void swapBuffers ()
 Swaps the screen contents with the off-screen buffer.
void lockProjectionUpdate (void)
 Lock update of projection matrix.
void unlockProjectionUpdate (void)
 Unlock update of projection matrix.
void trackMouse (bool _track)
 Enable/disable mouse tracking (move events with no button press).
void sceneGraph (ACG::SceneGraph::BaseNode *_root, const bool _resetTrackBall=false)
void projectionMode (ProjectionMode _p)
 Changes the projection mode and updates the projection matrix.
ProjectionMode projectionMode () const
 get current projection mode
void navigationMode (NavigationMode _n)
 Changes the navigation mode.
NavigationMode navigationMode () const
 get current navigation mode
void setScenePos (const ACG::Vec3d &_center, double _radius, const bool _resetTrackBall=false)
void setSceneCenter (const ACG::Vec3d &_center)
void setTrackBallCenter (const ACG::Vec3d &_center)
 Set Trackball Center point of scene.
const ACG::Vec3d trackBallCenter ()
 Get Trackball Center point of scene.
const ACG::Vec3d & scene_center () const
double scene_radius () const
void viewingDirection (const ACG::Vec3d &_dir, const ACG::Vec3d &_up)
 set the viewing direction
void normalsMode (NormalsMode _mode)
 set treatment of normals
NormalsMode normalsMode () const
 get treatment of normals
ACG::GLMatrixdlight_matrix ()
 get light rotation matrix
void rotate_lights (ACG::Vec3d &_axis, double _angle)
 rotete light sources
void update_lights ()
 update light position
void draw_lights ()
void copyToImage (QImage &_image, GLenum _buffer=GL_BACK)
 copy current framebuffer to an QImage
void copyToImage (QImage &_image, unsigned int _left, unsigned int _top, unsigned int _width, unsigned int _height, GLenum _buffer)
 copy current framebuffer to an QImage
unsigned int glWidth () const
 get width of QGLWidget
unsigned int glHeight () const
 get height of QGLWidget
QSize glSize () const
 get size of QGLWIdget
QPoint glMapFromGlobal (const QPoint &_pos) const
 map global to glarea coords
QPoint glMapToGlobal (const QPoint &_pos) const
 map glarea coords to global coords
void encodeView (QString &_view)
 convert current view to text representation
bool decodeView (const QString &_view)
void initModelviewMatrix ()
 initialize modelview matrix to identity
void grabGLArea ()
void releaseGLArea ()
void drawBlendedObjects (bool _status)
 One or two pass Drawing.
void translate (const ACG::Vec3d &trans)
 translate the scene and update modelview matrix
void rotate (const ACG::Vec3d &axis, double angle)
 rotate the scene (around its center) and update modelview matrix
void rotate (const ACG::Vec3d &axis, double angle, const ACG::Vec3d &_center)
 rotate the scene and update modelview matrix
void setCursorPainter (CursorPainter *_cursorPainter)
 sets the current cursor painter
void updateCursorPosition (QPointF _scenePos)
 will be called from CursorPainter to inform the viewer that the cursor position changed
void moveForward ()
 First person navigation: Move forward.
void moveBack ()
 First person navigation: Move back.
void strafeLeft ()
 First person navigation: Strafe left.
void strafeRight ()
 First person navigation: Strafe Right.

Protected Slots

virtual void slotWheelX (double _dAngle)
 process signals from wheelX_
virtual void slotWheelY (double _dAngle)
 process signals from wheelX_
virtual void slotWheelZ (double _dist)
 process signals from wheelZ_
virtual void cleanupEventFilter ()
 correct ??? (same function as in qt src)

Protected Member Functions

virtual void initializeGL ()
 initialize OpenGL states
virtual void paintGL ()
 draw the scene. Triggered by updateGL().
virtual void resizeEvent (QGraphicsSceneResizeEvent *_e)
 handle resize events
virtual void moveEvent (QGraphicsSceneMoveEvent *_e)
 handle move events
virtual void mousePressEvent (QGraphicsSceneMouseEvent *_event)
 handle mouse press events
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *_event)
 handle mouse double click events
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *_event)
 handle mouse move events
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *_event)
 handle mouse release events
virtual void wheelEvent (QGraphicsSceneWheelEvent *_event)
 handle mouse wheel events
virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent *_e)
 handle mouse press events
void viewMouseEvent (QMouseEvent *_event)
 specialized viewer: hande mouse events
void viewWheelEvent (QWheelEvent *_event)
 specialized viewer: handle wheel events
void viewKeyEvent (QKeyEvent *_event)
 specialized viewer: hande key events
void lightMouseEvent (QMouseEvent *)
 optional: hande mouse events to rotate light
void updateProjectionMatrix ()
 updates projection matrix

Protected Attributes

ACG::Vec3d scene_center_
ACG::Vec3d trackball_center_
double scene_radius_
double trackball_radius_
GLdouble orthoWidth_
GLdouble near_
GLdouble far_
GLdouble fovy_
bool isRotating_
bool lookAround_

Private Slots

void slotClickTimeout ()
 Handle click timeout.

Private Member Functions

 glViewer (const glViewer &)
 Copy constructor. Never used!
glVieweroperator= (const glViewer &)
 Assignment operator. Never used!
void createWidgets ()
void drawScene ()
void drawScene_mono ()
void drawScene_stereo ()
void drawScene_glStereo ()
void drawScene_anaglyphStereo ()
void drawScene_customAnaglyphStereo ()
void updateCustomAnaglyphStereo ()
void finiCustomAnaglyphStereo ()
void drawScenePhilipsStereo ()
void updateScenePhilipsStereo ()

Private Attributes

ACG::Vec3d home_center_
double home_radius_
ACG::GLMatrixd home_modelview_
ACG::GLMatrixd home_inverse_modelview_
double homeOrthoWidth_
ACG::GLMatrixd light_matrix_
NormalsMode normalsMode_
ProjectionMode projectionMode_
NavigationMode navigationMode_
bool trackMouse_
bool glareaGrabbed_
double frame_time_
ACG::SceneGraph::BaseNodesceneGraphRoot_
bool projectionUpdateLocked_
bool blending_
QGraphicsScene * glScene_
QGLWidget * glWidget_
QtGLViewerLayoutglBaseLayout_
std::vector< QAction * > drawMenuActions_
QTime redrawTime_
CursorPaintercursorPainter_
ACG::Vec3d cursorPoint3D_
bool cursorPositionValid_

Friends

class QtGLGraphicsScene
class SimpleGLGraphicsScene
class QtGLGraphicsView

Merge from examiner



QPoint lastPoint2D_
ACG::Vec3d lastPoint3D_
bool lastPoint_hitSphere_
bool allowRotation_
ACG::Vec3d lastRotationAxis_
double lastRotationAngle_
QTime lastMoveTime_
QTimer * timer_
QTimer clickTimer_
QTime clickTime_
QMouseEvent clickEvent_
void allowRotation (bool _mode)
 Lock scene rotation.
bool allowRotation ()
void slotAnimation ()
bool mapToSphere (const QPoint &_p, ACG::Vec3d &_result) const
 virtual trackball: map 2D screen point to unit sphere
void handleFirstPersonNavigation (QMouseEvent *_event)
 Navigate through scene if first person mode has been selected.
void handleNormalNavigation (QMouseEvent *_event)
 Navigate through scene if normal mode has been selected.

Wheels



ACG::QtWidgets::QtWheelwheelX_
ACG::QtWidgets::QtWheelwheelY_
ACG::QtWidgets::QtWheelwheelZ_
bool wheelsVisible ()
void slotShowWheels ()
void slotHideWheels ()

Stereo



bool stereo_
int agTexWidth_
int agTexHeight_
GLuint agTexture_ [2]
GLuint agProgram_
bool customAnaglyphSupported_
int pTexWidth_
int pTexHeight_
ACG::Texture2D pColorTexture_
ACG::Texture2D pDepthStencilTexture_
GLSL::PtrProgram pProgram_
bool philipsStereoInitialized_
virtual void setStereoMode (bool _b)
 enable/disable stereo mode

Picking



QGLFramebufferObject * pickCache_
 Framebuffer object that holds the pick cache.
bool updatePickCache_
 Should the pick cache be updated.
ACG::SceneGraph::PickTarget pickCacheTarget_
 Pick target stored in pick cache.
bool pickCacheSupported_
 Is pick caching supported.
bool pick (ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr=0)
bool pick_region (ACG::SceneGraph::PickTarget _pickTarget, const QRegion &_region, QList< QPair< unsigned int, unsigned int > > &_list)
bool fast_pick (const QPoint &_mousePos, ACG::Vec3d &_hitPoint)
int pickColor (ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr=0)
 pick using colors
bool pickGL (ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr=0)
 pick using selection buffer
int pickFromCache (ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, unsigned int &_nodeIdx, unsigned int &_targetIdx, ACG::Vec3d *_hitPointPtr=0)
 pick from cache

Viewer State



Viewer::ViewerPropertiesproperties_
 All properties for this viewer.
ACG::GLStateglstate_
 Gl State.
bool initialized_
 Have the viewer gl properties been initalized.
Viewer::ViewerPropertiesproperties ()
 Returns a pointer to the Viewer Status.
void slotPropertiesUpdated ()
void applyProperties ()

Drag and Drop



virtual void dragEnterEvent (QGraphicsSceneDragDropEvent *_e)
 drag & drop for modelview copying
virtual void dropEvent (QGraphicsSceneDragDropEvent *_e)
 drag & drop for modelview copying
void startDragEvent (QMouseEvent *_event)
void dragEnterEvent (QDragEnterEvent *_event)
void dropEvent (QDropEvent *_event)

Key handling



void signalKeyPressEvent (QKeyEvent *)
 Key Event received.
virtual void keyPressEvent (QKeyEvent *_event)
 Get keyPress events from the glArea.
virtual void keyReleaseEvent (QKeyEvent *_event)
 Get keyRelease events from the glArea.
virtual bool viewKeyPressEvent (QKeyEvent *)
 Handle key events in view mode.

Detailed Description

Base Viewer Widget: All viewers are derived from this one. Implements Mouse & Keyboard Events.

Definition at line 127 of file QtBaseViewer.hh.


Member Enumeration Documentation

Navigation mode.

Enumerator:
NORMAL_NAVIGATION 

Normal mode.

FIRSTPERSON_NAVIGATION 

First person mode.

Definition at line 197 of file QtBaseViewer.hh.

Automatically normalize normals?

Enumerator:
DONT_TOUCH_NORMALS 

use provided normals as is

NORMALIZE_NORMALS 

Automatically normalize normals. Input normals are not normalized or the transformation matrix does scaling or shearing.

Definition at line 248 of file QtBaseViewer.hh.

projection mode

Enumerator:
ORTHOGRAPHIC_PROJECTION 

orthographic

PERSPECTIVE_PROJECTION 

perspective

Definition at line 191 of file QtBaseViewer.hh.


Constructor & Destructor Documentation

glViewer::glViewer ( QGraphicsScene *  _scene,
QGLWidget *  _glWidget,
Viewer::ViewerProperties _properties,
QGraphicsWidget *  _parent = 0 
)

Create a glViewer.

Parameters:
_parent parent widget
_name name (qt internal, qt debugging)
_properties viewerOptions controlled by PluginFunctions
_statusBar pointer to an existing status bar for this widget, if statusBar==0 then a private status bar will be created
_format OpenGL context settings, will be passed to glarea()

Definition at line 133 of file QtBaseViewer.cc.

References glstate_, ACG::Matrix4x4T< Scalar >::identity(), NORMAL_NAVIGATION, NORMALIZE_NORMALS, PERSPECTIVE_PROJECTION, properties_, setHome(), slotClickTimeout(), and slotPropertiesUpdated().


Member Function Documentation

void glViewer::applyProperties (  )  [private]
bool glViewer::decodeView ( const QString &  _view  ) 

Decode and apply text representation of view encoded by encodeView(). If _view was successfully decoded it will immediately be applied and true is returned, false is returned else.

Definition at line 1214 of file QtBaseViewer.cc.

References glstate_, makeCurrent(), projectionMode(), ACG::GLState::set_modelview(), and updateGL().

void glViewer::dragEnterEvent ( QDragEnterEvent *  _event  )  [signal]

Signal is emitted only if in externalDragMode ( see setExternalDrag ) It will be send if a drag enters the gl widget.

void glViewer::dropEvent ( QDropEvent *  _event  )  [signal]

Signal is emitted only if in externalDragMode ( see setExternalDrag ) It will be send if a drop occurs in the gl widget.

bool glViewer::fast_pick ( const QPoint &  _mousePos,
ACG::Vec3d &  _hitPoint 
)

get the coordinates of the picked point by z-buffer re-projection

Parameters:
_mousePos The position to pick
_hitPoint The point returned by the reprojection
Returns:
Successfull?

Definition at line 652 of file QtBaseViewerPicking.cc.

References glHeight(), Viewer::ViewerProperties::glState(), makeCurrent(), properties_, and ACG::GLState::unproject().

Referenced by handleNormalNavigation().

void glViewer::flyTo ( const ACG::Vec3d &  _position,
const ACG::Vec3d &  _center,
double  _time = 1000.0 
) [virtual, slot]

Fly to point and set new viewing direction (animated).

Parameters:
_position New viewer position ( the new eye point of the viewer )
_center The new scene center ( the point we are looking at )
_time Animation time in ms

Definition at line 858 of file QtBaseViewer.cc.

References glstate_, makeCurrent(), ACG::GLState::modelview(), rotate(), translate(), updateGL(), and updatePickCache_.

void glViewer::flyTo ( const QPoint &  _pos,
bool  _move_back 
) [virtual, slot]

Fly to. Get closer if _move_back=false, get more distant else.

Todo:
: Translate view such that hitpoint is in center of viewport

Definition at line 817 of file QtBaseViewer.cc.

References ACG::GLState::eye(), glstate_, makeCurrent(), PERSPECTIVE_PROJECTION, pick(), ACG::SceneGraph::PICK_ANYTHING, updateGL(), updateProjectionMatrix(), and viewChanged().

Referenced by handleFirstPersonNavigation(), and handleNormalNavigation().

virtual void glViewer::keyPressEvent ( QKeyEvent *  _event  )  [inline, protected, virtual]

Get keyPress events from the glArea.

This function is called by the internal gl widget when receiving a key press event.

Definition at line 713 of file QtBaseViewer.hh.

virtual void glViewer::keyReleaseEvent ( QKeyEvent *  _event  )  [inline, protected, virtual]

Get keyRelease events from the glArea.

This function is called by the internal gl widget when receiving a key release event. Here these events are simply passed to the parent widget.

Definition at line 721 of file QtBaseViewer.hh.

bool glViewer::pick ( ACG::SceneGraph::PickTarget  _pickTarget,
const QPoint &  _mousePos,
unsigned int &  _nodeIdx,
unsigned int &  _targetIdx,
ACG::Vec3d *  _hitPointPtr = 0 
)

Apply pick action.
Information about the picked primitive is stored in the provided pointers. No information is stored if 0-pointers are given. Resulting values are defined only if true has been returned!

Parameters:
_pickTarget Select what should be picked: Faces/Vertices/...
_mousePos The position to be used for picking
_nodeIdx If picking is successfull this will contain the id of the scenegraph node picked.
_targetIdx Special index defined by the picked Node. E.g. Facehandle/VertexHandle/.. for MeshNodes
_hitPointPtr Pointer to 3D point from picking
Returns:
Successfull?

Definition at line 71 of file QtBaseViewerPicking.cc.

References pickColor(), pickFromCache(), and pickGL().

Referenced by flyTo(), and updateCursorPosition().

bool glViewer::pick_region ( ACG::SceneGraph::PickTarget  _pickTarget,
const QRegion &  _region,
QList< QPair< unsigned int, unsigned int > > &  _list 
)

Apply pick action.
Picks all objects in the given Region. Information about the picked primitives is stored in the provided list. Resulting values are defined only if true has been returned!

Parameters:
_pickTarget Select what should be picked: Faces/Vertices/...
_region Area for picking
_list List of found scenegraph objects (node/target pairs)
Returns:
Successfull?

Definition at line 510 of file QtBaseViewerPicking.cc.

References ACG::GLState::clear_color(), Viewer::ViewerProperties::drawMode(), ACG::Matrix4x4T< Scalar >::get_raw_data(), glHeight(), Viewer::ViewerProperties::glState(), glWidth(), makeCurrent(), ACG::GLState::modelview(), ACG::GLState::pick_color_to_stack(), ACG::GLState::pick_error(), ACG::GLState::pick_init(), pickCache_, pickCacheSupported_, pickCacheTarget_, ACG::GLState::projection(), properties_, ACG::GLState::set_clear_color(), ACG::SceneGraph::traverse_multipass(), and updatePickCache_.

const ACG::Vec3d& glViewer::scene_center (  )  const [inline]

Get scene's center

See also:
setScenePos()

Definition at line 238 of file QtBaseViewer.hh.

double glViewer::scene_radius (  )  const [inline]

Get scene's radius

See also:
setScenePos()

Definition at line 242 of file QtBaseViewer.hh.

void glViewer::sceneGraph ( ACG::SceneGraph::BaseNode _root,
const bool  _resetTrackBall = false 
)

Set scene graph. Sets the scene graph to the the graph rooted at _root. Recomputes Scene center and resets the trackball center if specified. The sceneGraphToched() signal will be emitted (even if _root does not actually change).

Definition at line 261 of file QtBaseViewer.cc.

References ACG::SceneGraph::BoundingBoxAction::bbMax(), ACG::SceneGraph::BoundingBoxAction::bbMin(), ACG::SceneGraph::MultiPassInfoAction::getMaxPasses(), glstate_, ACG::GLState::set_max_render_passes(), setScenePos(), signalSceneGraphChanged(), ACG::SceneGraph::traverse(), and updateGL().

Referenced by CoreWidget::CoreWidget(), initializeGL(), and viewAll().

void glViewer::setSceneCenter ( const ACG::Vec3d &  _center  ) 

Set new center point of scene

Definition at line 434 of file QtBaseViewer.cc.

void glViewer::setScenePos ( const ACG::Vec3d &  _center,
double  _radius,
const bool  _resetTrackBall = false 
)

Sets the center and dimension of the whole scene. This point is used as fixpoint for rotations and to set the eye point far enough from the scene so that the whole scene is visible.

Definition at line 407 of file QtBaseViewer.cc.

References glstate_, ACG::GLState::modelview(), updateGL(), updateProjectionMatrix(), and viewChanged().

Referenced by sceneGraph().

void glViewer::setTrackBallCenter ( const ACG::Vec3d &  _center  ) 

Set Trackball Center point of scene.

The scene is rotated around the trackball center when using the mouse

Definition at line 441 of file QtBaseViewer.cc.

void glViewer::signalCustomContextMenuRequested ( const QPoint &   )  [signal]

If popups are disabled context menu mode is set to custom Menu and the signal is passed from the QGLWidget to this signal. You can use mapToGlobal for mapping this point to global coords.

Referenced by contextMenuEvent().

void glViewer::signalKeyPressEvent ( QKeyEvent *   )  [signal]

Key Event received.

This signal is emitted if a Key press event is received which is not handled by the widget itself. If internal key handling is disabled the events are passed to the parent of this widget.

void glViewer::signalMouseEvent ( QMouseEvent *  ,
const std::string &   
) [signal]

A signal for giving mouse events to the application. This is done if the Pick-Button (top-most button of the toolbar) is activated. Connect to this signal to implement application specific handling of mouse events.
Notes:

  • You have to test for the QMouseEvent::type() of the event yourself (press/release/move)!
  • signalMouseEventIdentify() is emitted on button press if actionMode()==Question.

Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

void glViewer::signalMouseEventClick ( QMouseEvent *  ,
bool  _double 
) [signal]

Emitted if a (double) mouse click is performed in actionMode()==ExamineMode

Referenced by mouseDoubleClickEvent(), and slotClickTimeout().

void glViewer::signalMouseEventIdentify ( QMouseEvent *   )  [signal]

Emitted instead o signalMouseEvent() if actionMode()==Question and _event is a mouse press event.

Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

void glViewer::slotPropertiesUpdated (  )  [private, slot]

Called when properties for the viewer require a redraw The slot will trigger the redraw after setting the right properties.

Definition at line 2134 of file QtBaseViewer.cc.

References applyProperties(), makeCurrent(), and updateGL().

Referenced by glViewer().

void glViewer::snapshot (  )  [virtual, slot]

Trigger a snapshot and increase the snapshot counter. Save snapshot to file determined by snapshotBaseFileName() and the current snapshot counter. The back buffer will be saved.

Definition at line 2172 of file QtBaseViewer.cc.

References copyToImage(), glHeight(), glWidth(), makeCurrent(), paintGL(), properties_, Viewer::ViewerProperties::snapshotCounter(), and Viewer::ViewerProperties::snapshotName().

void glViewer::startDragEvent ( QMouseEvent *  _event  )  [signal]

Signal is emitted when Control modifier is pressed and mouse moded. It will only be emitted if in externalDragMode ( see setExternalDrag )

Referenced by mousePressEvent().

const ACG::Vec3d glViewer::trackBallCenter (  )  [inline]

Get Trackball Center point of scene.

The scene is rotated around the trackball center when using the mouse

Definition at line 233 of file QtBaseViewer.hh.

virtual bool glViewer::viewKeyPressEvent ( QKeyEvent *   )  [inline, protected, virtual]

Handle key events in view mode.

This funtion is called by the BaseViewer if a key press event occured in view mode. This function has to be implemented by every viewer!

Returns:
If the derived class handled the event it has to return true otherwise false

Definition at line 730 of file QtBaseViewer.hh.


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

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .