#include <RenderableQGL.h>
Inheritance diagram for RenderableQGL:
Definition at line 34 of file RenderableQGL.h.
Get/Set/Del Renderables | |
virtual void | addRenderable (Renderable *r) |
renderable management | |
virtual Renderable * | getRenderable (unsigned int i) |
virtual void | delRenderable (unsigned int i) |
virtual void | delRenderable (Renderable *r) |
virtual RenderableVec | getRenderables () const |
virtual void | setRenderables (RenderableVec &v) |
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. | |
events from BasicQGL | |
virtual void | mouseMoveEvent (QMouseEvent *e) |
Mouse move. | |
virtual void | mousePressEvent (QMouseEvent *e) |
Mouse down. | |
virtual void | mouseReleaseEvent (QMouseEvent *e) |
Mouse up. | |
virtual void | mouseDoubleClickEvent (QMouseEvent *e) |
Mouse double down. | |
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 | |
RenderableQGL (QWidget *parent=0, const char *name=0) | |
virtual | ~RenderableQGL () |
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 | draw () |
overide this draw function to implement new behaviors in subclasses | |
virtual bool | pickGL (gutz::MouseEventSP me) |
pick (GL style) a renderable or widget returns true if something was picked, false otherwize also sets the picked object... | |
virtual bool | castPick (unsigned int name, unsigned int ptr) |
casts the picked object (renderable or widget right now) to the right thing based on the name identifier | |
virtual void | drawRenderables () |
call this one to simply cycle through the renderables calling draw on each one. | |
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 | initManipulators () |
init Camera and Manip | |
Protected Attributes | |
RenderableVec | _rens |
all renderables | |
bool | _picking |
RenderableSP | _picked |
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 BasicQGL::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 36 of file RenderableQGL.cpp. References BasicQGL::_cam, BasicQGL::_manip, BasicQGL::_time, BasicQGL::initManipulators(), name, and Timer::silent(). |
|
Definition at line 54 of file RenderableQGL.cpp. |
|
renderable management
Definition at line 301 of file RenderableQGL.cpp. Referenced by SimianQGL::setVolumeRenderer(), and TFGL::TFGL(). |
|
These are about to be depricated... moving to gutz::Signal.
Referenced by BasicQGL::mouseMoveEvent(). |
|
casts the picked object (renderable or widget right now) to the right thing based on the name identifier
Definition at line 275 of file RenderableQGL.cpp. References _picked, name, and RENDERABLE_NAME. Referenced by pickGL(). |
|
Definition at line 331 of file RenderableQGL.cpp. References _rens, r, RenderableSP, and RenderableVecIter. |
|
Definition at line 315 of file RenderableQGL.cpp. References _rens, and RenderableVecIter. Referenced by SimianQGL::setVolumeRenderer(). |
|
overide this draw function to implement new behaviors in subclasses TODO: remove QT signals for simian events use gutz::signal if picking, the projection matrix can't be messed with. We reset it every pass, so the pick uses the last projection matrix we set. Reimplemented from BasicQGL. Definition at line 65 of file RenderableQGL.cpp. References BasicQGL::_cam, _picking, BasicQGL::_time, BasicQGL::_timeOn, BasicQGL::drawDone, BasicQGL::drawFinished(), drawRenderables(), Timer::et(), GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_MODELVIEW, GL_PROJECTION, glClear(), glColor4f(), glFinish(), glLoadMatrixf(), glMatrixMode(), glPopMatrix(), glPushMatrix(), Timer::start(), and t. Referenced by pickGL(). |
|
These are about to be depricated... moving to gutz::Signal signal called after complete raw Referenced by draw(), and BasicQGL::draw(). |
|
call this one to simply cycle through the renderables calling draw on each one.
Definition at line 111 of file RenderableQGL.cpp. References BasicQGL::_cam, BasicQGL::_manip, _picking, _rens, and RenderableVecIter. Referenced by draw(). |
|
Stop (all) timers.
Definition at line 83 of file BasicQGL.h. |
|
Definition at line 63 of file BasicQGL.h. References BasicQGL::_cam. |
|
Definition at line 65 of file BasicQGL.h. References BasicQGL::_manip. |
|
Definition at line 307 of file RenderableQGL.cpp. References _rens. |
|
Definition at line 340 of file RenderableQGL.cpp. References _rens, and RenderableVec. |
|
Definition at line 106 of file BasicQGL.h. References BasicQGL::_cam. |
|
Definition at line 321 of file BasicQGL.cpp. References BasicQGL::_keyMap. Referenced by BasicQGL::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 BasicQGL::_cam, BasicQGL::_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::BasicQGL(), and 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 BasicQGL::handleKeyCmd(), and s. |
|
Definition at line 311 of file BasicQGL.cpp. |
|
These are about to be depricated... moving to gutz::Signal.
Referenced by BasicQGL::mouseMoveEvent(). |
|
Mouse double down.
Reimplemented from BasicQGL. Definition at line 219 of file RenderableQGL.cpp. References BasicQGL::mouseDoubleClickEvent(). |
|
Mouse move. TODO: nuke debug statements, or make them part of a proper base class update the current move event's position see if the pick wanted the move did, so return didn't so un pick it some error checking, so we might have a chance of working :) TODO: nuke this, at some point decide that you are doing the right thing. if we made it his far, the pick didn't exist or didn't want the event, so just do the standard move. Reimplemented from BasicQGL. Definition at line 132 of file RenderableQGL.cpp. References BasicQGL::_cam, BasicQGL::_manip, _picked, BasicQGL::mouseMoveEvent(), qt2GutzMouse(), BasicQGL::update(), and gutz::vec3f. |
|
Mouse down. see if we picked something something got picked make sure picked actually got set see if the pick wants the event did want the event, so it was forwarded didn't want the event, so.. unpick revert to standard mouse events if nothing was picked, or the pick didn't want the event. Reimplemented from BasicQGL. Definition at line 173 of file RenderableQGL.cpp. References BasicQGL::_cam, BasicQGL::_manip, _picked, BasicQGL::mousePressEvent(), pickGL(), qt2GutzMouse(), BasicQGL::update(), and gutz::vec3f. |
|
Mouse up. make sure everyone knows that the mouse is up Reimplemented from BasicQGL. Definition at line 203 of file RenderableQGL.cpp. References BasicQGL::_cam, BasicQGL::_manip, _picked, gutz::GUTZ_BUTTON_NONE, BasicQGL::mouseReleaseEvent(), and qt2GutzMouse(). |
|
Definition at line 159 of file BasicQGL.h. References BasicQGL::draw(). |
|
Definition at line 74 of file BasicQGL.h. References BasicQGL::_timeOn. |
|
Definition at line 73 of file BasicQGL.h. References BasicQGL::_time, BasicQGL::_timeOn, and Timer::start(). |
|
pick (GL style) a renderable or widget returns true if something was picked, false otherwize also sets the picked object... TODO: unify renderables and widgets... done Definition at line 233 of file RenderableQGL.cpp. References _picked, _picking, castPick(), data, draw(), Pick::endPickGL(), height, PickInfoVec, and Pick::startPickGL(). Referenced by mousePressEvent(). |
|
pre intialized data buffer, with size elements, desired format for read, false = success, true = failure
Definition at line 370 of file BasicQGL.cpp. References BasicQGL::_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 BasicQGL::_cam, GL_MODELVIEW, GL_PROJECTION, glLoadMatrixf(), glMatrixMode(), GLsizei, glViewport(), and w. |
|
Definition at line 64 of file BasicQGL.h. References BasicQGL::_cam, and BasicQGL::update(). |
|
Definition at line 97 of file BasicQGL.h. References BasicQGL::_keyMap, and BasicQGL::KeyCmdSPType. |
|
Definition at line 66 of file BasicQGL.h. References BasicQGL::_manip, and BasicQGL::update(). |
|
Definition at line 345 of file RenderableQGL.cpp. |
|
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 BasicQGL::_cam, BasicQGL::_manip, BasicQGL::_mouseDown, and BasicQGL::update(). |
|
Definition at line 58 of file BasicQGL.h. Referenced by BasicQGL::mouseDoubleClickEvent(), mouseMoveEvent(), BasicQGL::mouseMoveEvent(), mousePressEvent(), BasicQGL::mousePressEvent(), BasicQGL::mouseReleaseEvent(), BasicQGL::setCamera(), BasicQGL::setManip(), and BasicQGL::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 BasicQGL::handleKeyCmd(), and BasicQGL::setKeyCmd(). |
|
|
Definition at line 184 of file BasicQGL.h. Referenced by BasicQGL::mouseDoubleClickEvent(), BasicQGL::mouseMoveEvent(), BasicQGL::mousePressEvent(), BasicQGL::mouseReleaseEvent(), and BasicQGL::timerEvent(). |
|
Definition at line 89 of file RenderableQGL.h. Referenced by castPick(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), and pickGL(). |
|
Definition at line 88 of file RenderableQGL.h. Referenced by draw(), drawRenderables(), and pickGL(). |
|
all renderables
Definition at line 86 of file RenderableQGL.h. Referenced by addRenderable(), delRenderable(), drawRenderables(), getRenderable(), getRenderables(), and setRenderables(). |
|
performance timer
Definition at line 192 of file BasicQGL.h. Referenced by draw(), BasicQGL::perfTimerOn(), and RenderableQGL(). |
|
performance timer on?
Definition at line 193 of file BasicQGL.h. Referenced by draw(), and BasicQGL::perfTimerOn(). |
|
signal: drawDone(), called after the draw event completes.
Definition at line 125 of file BasicQGL.h. Referenced by draw(), and BasicQGL::draw(). |