#include <BasicQGL.h>
Inheritance diagram for BasicQGL:
Definition at line 51 of file BasicQGL.h.
Camera/Manip Set/Get | |
virtual gutz::CameraSP | getCamera () const |
virtual void | setCamera (gutz::CameraSP c) |
virtual gutz::ManipSP | getManip () const |
virtual void | setManip (gutz::ManipSP m) |
Performance Timer on/off | |
void | perfTimerOn (bool onoff) |
bool | perfTimerOn () const |
Redraw Timer (event callback timer) | |
virtual void | endTimer () |
Stop (all) timers. | |
virtual void | setTimer (int ms_time) |
Start the render timer, updates every ms_time miliseconds. | |
Framebuffer Readback/Write & size: | |
gutz::vec2ui | getScreenDims () const |
bool | readFrameBuffer (void *dataPtr, int size, GLenum format=GL_RGBA, GLenum type=GL_UNSIGNED_BYTE) |
pre intialized data buffer, with size elements, desired format for read, false = success, true = failure | |
bool | writeFrameBuffer (void *dataPtr, int x, int y, GLenum format=GL_RGBA, GLenum type=GL_UNSIGNED_BYTE) |
gutz::Signals | |
gutz::Signal | drawDone |
signal: drawDone(), called after the draw event completes. | |
Public Types | |
typedef KeyCmdQt< BasicQGL > | KeyCmdType |
typedef gutz::SmartPtr< KeyCmdType > | KeyCmdSPType |
Signals | |
void | cameraChanged (gutz::CameraSP c) |
These are about to be depricated... moving to gutz::Signal. | |
void | manipChanged (gutz::ManipSP m) |
These are about to be depricated... moving to gutz::Signal. | |
void | drawFinished () |
These are about to be depricated... | |
Public Member Functions | |
BasicQGL (QWidget *parent=0, const char *name=0) | |
virtual | ~BasicQGL () |
virtual void | update () |
void | setKeyCmd (char key, KeyCmdType *cmd) |
Protected Types | |
typedef std::map< char, KeyCmdSPType, ltchar > | KeyMapType |
A quick and dirty keyboard command/callback helper :). | |
Protected Member Functions | |
virtual void | mouseMoveEvent (QMouseEvent *e) |
virtual void | mousePressEvent (QMouseEvent *e) |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
virtual void | keyPressEvent (QKeyEvent *e) |
virtual void | keyReleaseEvent (QKeyEvent *e) |
virtual void | handleKeyCmd (QKeyEvent *e) |
virtual void | initializeGL () |
virtual void | resizeGL (int width, int height) |
virtual void | paintGL () |
virtual void | timerEvent (QTimerEvent *) |
virtual void | draw () |
overide this draw function | |
virtual void | initManipulators () |
init Camera and Manip | |
Protected Attributes | |
gutz::CameraSP | _cam |
gutz::ManipSP | _manip |
bool | _mouseDown |
KeyMapType | _keyMap |
Timer | _time |
performance timer | |
bool | _timeOn |
performance timer on? |
|
Definition at line 96 of file BasicQGL.h. Referenced by setKeyCmd(). |
|
Definition at line 95 of file BasicQGL.h. |
|
A quick and dirty keyboard command/callback helper :).
Definition at line 189 of file BasicQGL.h. |
|
Definition at line 51 of file BasicQGL.cpp. References _cam, _manip, initManipulators(), and name. |
|
Definition at line 64 of file BasicQGL.cpp. |
|
These are about to be depricated... moving to gutz::Signal.
Referenced by mouseMoveEvent(). |
|
overide this draw function TODO: remove QT signals for simian events, use gutz::Signal Reimplemented in RenderableQGL. Definition at line 145 of file BasicQGL.cpp. References _cam, drawDone, drawFinished(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_MODELVIEW, GL_PROJECTION, GL_QUADS, glBegin(), glClear(), glColor4f(), glEnd(), glLoadMatrixf(), glMatrixMode(), glPopMatrix(), glPushMatrix(), and glVertex3f(). Referenced by paintGL(). |
|
These are about to be depricated... moving to gutz::Signal signal called after complete raw Referenced by RenderableQGL::draw(), and draw(). |
|
Stop (all) timers.
Definition at line 83 of file BasicQGL.h. |
|
Definition at line 63 of file BasicQGL.h. References _cam. |
|
Definition at line 65 of file BasicQGL.h. References _manip. |
|
Definition at line 106 of file BasicQGL.h. References _cam. |
|
Definition at line 321 of file BasicQGL.cpp. References _keyMap. Referenced by keyPressEvent(). |
|
Definition at line 73 of file BasicQGL.cpp. References GL_AMBIENT, GL_COLOR_MATERIAL, GL_CULL_FACE, GL_DEPTH_TEST, GL_DIFFUSE, GL_FALSE, GL_FRONT_AND_BACK, GL_LEQUAL, GL_LIGHT0, GL_LIGHT_MODEL_AMBIENT, GL_LIGHT_MODEL_TWO_SIDE, GL_LIGHTING, GL_POSITION, GL_SHININESS, GL_SMOOTH, GL_SPECULAR, glClearColor(), glDepthFunc(), glDisable(), glEnable(), glewInit(), glLightfv(), glLightModelfv(), glMaterialfv(), and glShadeModel(). |
|
init Camera and Manip
Definition at line 341 of file BasicQGL.cpp. References _cam, _manip, gutz::CAM_DOLLY, gutz::CAM_ROT, gutz::CAM_SWIVEL, gutz::CAM_TRANS_XY, gutz::CAM_TRANS_XZ, gutz::CAM_TRANS_ZY, gutz::CAM_ZOOM, gutz::GUTZ_CTRL, gutz::GUTZ_DOWN_ARROW, gutz::GUTZ_LEFT_MOUSE, gutz::GUTZ_MIDDLE_MOUSE, gutz::GUTZ_RIGHT_MOUSE, gutz::GUTZ_SHIFT, gutz::GUTZ_UP_ARROW, and gutz::vec3f. Referenced by BasicQGL(), and RenderableQGL::RenderableQGL(). |
|
Let's be a nice interface and only use the key if we want it Definition at line 281 of file BasicQGL.cpp. References handleKeyCmd(), and s. |
|
Definition at line 311 of file BasicQGL.cpp. |
|
These are about to be depricated... moving to gutz::Signal.
Referenced by mouseMoveEvent(). |
|
Reimplemented in RenderableQGL. Definition at line 200 of file BasicQGL.cpp. References _cam, _manip, _mouseDown, qt2GutzMouse(), and update(). Referenced by RenderableQGL::mouseDoubleClickEvent(). |
|
update the current move event's position Reimplemented in RenderableQGL. Definition at line 243 of file BasicQGL.cpp. References _cam, _manip, _mouseDown, cameraChanged(), manipChanged(), qt2GutzMouse(), update(), and gutz::vec3f. Referenced by RenderableQGL::mouseMoveEvent(). |
|
Reimplemented in RenderableQGL. Definition at line 178 of file BasicQGL.cpp. References _cam, _manip, _mouseDown, qt2GutzMouse(), and update(). Referenced by RenderableQGL::mousePressEvent(). |
|
Reimplemented in RenderableQGL. Definition at line 221 of file BasicQGL.cpp. References _cam, _manip, _mouseDown, gutz::GUTZ_BUTTON_NONE, and update(). Referenced by RenderableQGL::mouseReleaseEvent(). |
|
Definition at line 159 of file BasicQGL.h. References draw(). |
|
Definition at line 74 of file BasicQGL.h. References _timeOn. |
|
Definition at line 73 of file BasicQGL.h. References _time, _timeOn, and Timer::start(). |
|
pre intialized data buffer, with size elements, desired format for read, false = success, true = failure
Definition at line 370 of file BasicQGL.cpp. References _cam, format, GL_BGR_EXT, GL_BGRA_EXT, GL_RGB, GL_RGBA, glErr(), glReadPixels(), size, and type. |
|
had to change this to respect the users settings for perspective/ortho Definition at line 122 of file BasicQGL.cpp. References _cam, GL_MODELVIEW, GL_PROJECTION, glLoadMatrixf(), glMatrixMode(), GLsizei, glViewport(), and w. |
|
Definition at line 64 of file BasicQGL.h. |
|
Definition at line 97 of file BasicQGL.h. References _keyMap, and KeyCmdSPType. |
|
Definition at line 66 of file BasicQGL.h. |
|
Start the render timer, updates every ms_time miliseconds.
Definition at line 85 of file BasicQGL.h. |
|
Definition at line 161 of file BasicQGL.h. References _cam, _manip, _mouseDown, and update(). |
|
Definition at line 58 of file BasicQGL.h. Referenced by mouseDoubleClickEvent(), RenderableQGL::mouseMoveEvent(), mouseMoveEvent(), RenderableQGL::mousePressEvent(), mousePressEvent(), mouseReleaseEvent(), setCamera(), setManip(), and timerEvent(). |
|
Definition at line 401 of file BasicQGL.cpp. References format, glDrawPixels(), glErr(), and type. |
|
|
Definition at line 190 of file BasicQGL.h. Referenced by handleKeyCmd(), and setKeyCmd(). |
|
|
Definition at line 184 of file BasicQGL.h. Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and timerEvent(). |
|
performance timer
Definition at line 192 of file BasicQGL.h. Referenced by RenderableQGL::draw(), perfTimerOn(), and RenderableQGL::RenderableQGL(). |
|
performance timer on?
Definition at line 193 of file BasicQGL.h. Referenced by RenderableQGL::draw(), and perfTimerOn(). |
|
signal: drawDone(), called after the draw event completes.
Definition at line 125 of file BasicQGL.h. Referenced by RenderableQGL::draw(), and draw(). |