#include <qt_ogre_render_window.h>
Public Member Functions | |
bool | enableStereo (bool enable) |
Enable or disable stereo rendering If stereo is not supported this is ignored. | |
Ogre::Camera * | getCamera () const |
Ogre::Viewport * | getViewport () const |
QtOgreRenderWindow (QWidget *parent=0) | |
void | setAutoRender (bool auto_render) |
void | setBackgroundColor (Ogre::ColourValue color) |
void | setCamera (Ogre::Camera *camera) |
void | setOrthoScale (float scale) |
Set the scale of the orthographic window. Only valid for an orthographic camera. | |
void | setOverlaysEnabled (bool overlays_enabled) |
virtual void | setPostRenderCallback (boost::function< void()> func) |
virtual void | setPreRenderCallback (boost::function< void()> func) |
void | setupStereo () |
Prepare to render in stereo if enabled and supported. | |
virtual QSize | sizeHint () const |
virtual | ~QtOgreRenderWindow () |
Protected Member Functions | |
virtual void | paintEvent (QPaintEvent *e) |
virtual void | postViewportUpdate (const Ogre::RenderTargetViewportEvent &evt) |
void | prepareStereoViewport (Ogre::Viewport *) |
virtual void | preViewportUpdate (const Ogre::RenderTargetViewportEvent &evt) |
virtual void | resizeEvent (QResizeEvent *event) |
void | setCameraAspectRatio () |
Protected Attributes | |
bool | auto_render_ |
Ogre::ColourValue | background_color_ |
Ogre::Camera * | camera_ |
Ogre::Camera * | left_camera_ |
Ogre::Root * | ogre_root_ |
float | ortho_scale_ |
bool | overlays_enabled_ |
boost::function< void()> | post_render_callback_ |
Functor which is called after each render. | |
boost::function< void()> | pre_render_callback_ |
Functor which is called before each render. | |
bool | rendering_stereo_ |
Ogre::Camera * | right_camera_ |
Ogre::Viewport * | right_viewport_ |
bool | stereo_enabled_ |
Ogre::Viewport * | viewport_ |
Qt Ogre render window widget. Similar in API to wxOgreRenderWindow from ogre_tools release 1.6, but with much of the guts replaced by new RenderSystem and RenderWidget classes inspired by the initialization sequence of Gazebo's renderer.
Definition at line 55 of file qt_ogre_render_window.h.
rviz::QtOgreRenderWindow::QtOgreRenderWindow | ( | QWidget * | parent = 0 | ) |
Constructor.
parent | The parent wxWindow component. |
Definition at line 51 of file qt_ogre_render_window.cpp.
rviz::QtOgreRenderWindow::~QtOgreRenderWindow | ( | ) | [virtual] |
Destructor.
Definition at line 81 of file qt_ogre_render_window.cpp.
bool rviz::QtOgreRenderWindow::enableStereo | ( | bool | enable | ) |
Enable or disable stereo rendering If stereo is not supported this is ignored.
Definition at line 87 of file qt_ogre_render_window.cpp.
Ogre::Camera* rviz::QtOgreRenderWindow::getCamera | ( | ) | const [inline] |
Definition at line 94 of file qt_ogre_render_window.h.
Ogre::Viewport * rviz::QtOgreRenderWindow::getViewport | ( | ) | const |
Gets the associated Ogre viewport. If this is called before QWidget::show() on this widget, it will fail an assertion. Several functions of Ogre::Viewport are duplicated in this class which can be called before QWidget::show(), and their effects are propagated to the viewport when it is created.
Definition at line 210 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::paintEvent | ( | QPaintEvent * | e | ) | [protected, virtual] |
Reimplemented from rviz::RenderWidget.
Definition at line 293 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::postViewportUpdate | ( | const Ogre::RenderTargetViewportEvent & | evt | ) | [protected, virtual] |
Definition at line 191 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::prepareStereoViewport | ( | Ogre::Viewport * | ) | [protected] |
prepare a viewport's camera for stereo rendering. This should only be called from StereoRenderTargetListener
void rviz::QtOgreRenderWindow::preViewportUpdate | ( | const Ogre::RenderTargetViewportEvent & | evt | ) | [protected, virtual] |
Definition at line 141 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::resizeEvent | ( | QResizeEvent * | event | ) | [protected, virtual] |
Reimplemented from rviz::RenderWidget.
Definition at line 321 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::setAutoRender | ( | bool | auto_render | ) | [inline] |
Definition at line 111 of file qt_ogre_render_window.h.
void rviz::QtOgreRenderWindow::setBackgroundColor | ( | Ogre::ColourValue | color | ) |
Definition at line 247 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::setCamera | ( | Ogre::Camera * | camera | ) |
Set the camera associated with this render window's viewport.
Definition at line 215 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::setCameraAspectRatio | ( | ) | [protected] |
Sets the aspect ratio on the camera
Definition at line 257 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::setOrthoScale | ( | float | scale | ) |
Set the scale of the orthographic window. Only valid for an orthographic camera.
scale | The scale |
Definition at line 275 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::setOverlaysEnabled | ( | bool | overlays_enabled | ) |
Definition at line 237 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::setPostRenderCallback | ( | boost::function< void()> | func | ) | [virtual] |
Set a callback which is called after each render
func | The callback functor |
Definition at line 287 of file qt_ogre_render_window.cpp.
void rviz::QtOgreRenderWindow::setPreRenderCallback | ( | boost::function< void()> | func | ) | [virtual] |
Set a callback which is called before each render
func | The callback functor |
Definition at line 282 of file qt_ogre_render_window.cpp.
Prepare to render in stereo if enabled and supported.
Definition at line 95 of file qt_ogre_render_window.cpp.
virtual QSize rviz::QtOgreRenderWindow::sizeHint | ( | ) | const [inline, virtual] |
Overrides the default implementation. This override is here for convenience. Returns a symbolic 320x240px size.
Definition at line 80 of file qt_ogre_render_window.h.
bool rviz::QtOgreRenderWindow::auto_render_ [protected] |
Definition at line 147 of file qt_ogre_render_window.h.
Ogre::ColourValue rviz::QtOgreRenderWindow::background_color_ [protected] |
Definition at line 151 of file qt_ogre_render_window.h.
Ogre::Camera* rviz::QtOgreRenderWindow::camera_ [protected] |
Reimplemented in ImageView.
Definition at line 149 of file qt_ogre_render_window.h.
Ogre::Camera* rviz::QtOgreRenderWindow::left_camera_ [protected] |
Definition at line 156 of file qt_ogre_render_window.h.
Ogre::Root* rviz::QtOgreRenderWindow::ogre_root_ [protected] |
Definition at line 141 of file qt_ogre_render_window.h.
float rviz::QtOgreRenderWindow::ortho_scale_ [protected] |
Definition at line 146 of file qt_ogre_render_window.h.
bool rviz::QtOgreRenderWindow::overlays_enabled_ [protected] |
Definition at line 150 of file qt_ogre_render_window.h.
boost::function<void ()> rviz::QtOgreRenderWindow::post_render_callback_ [protected] |
Functor which is called after each render.
Definition at line 144 of file qt_ogre_render_window.h.
boost::function<void ()> rviz::QtOgreRenderWindow::pre_render_callback_ [protected] |
Functor which is called before each render.
Definition at line 143 of file qt_ogre_render_window.h.
bool rviz::QtOgreRenderWindow::rendering_stereo_ [protected] |
Definition at line 155 of file qt_ogre_render_window.h.
Ogre::Camera* rviz::QtOgreRenderWindow::right_camera_ [protected] |
Definition at line 157 of file qt_ogre_render_window.h.
Ogre::Viewport* rviz::QtOgreRenderWindow::right_viewport_ [protected] |
Definition at line 158 of file qt_ogre_render_window.h.
bool rviz::QtOgreRenderWindow::stereo_enabled_ [protected] |
Definition at line 154 of file qt_ogre_render_window.h.
Ogre::Viewport* rviz::QtOgreRenderWindow::viewport_ [protected] |
Definition at line 139 of file qt_ogre_render_window.h.