Public Member Functions | Protected Member Functions | Protected Attributes
rviz::QtOgreRenderWindow Class Reference

#include <qt_ogre_render_window.h>

Inheritance diagram for rviz::QtOgreRenderWindow:
Inheritance graph
[legend]

List of all members.

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_

Detailed Description

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.


Constructor & Destructor Documentation

Constructor.

Parameters:
parentThe parent wxWindow component.

Definition at line 51 of file qt_ogre_render_window.cpp.

Destructor.

Definition at line 81 of file qt_ogre_render_window.cpp.


Member Function Documentation

Enable or disable stereo rendering If stereo is not supported this is ignored.

Returns:
the old setting (whether stereo was enabled before)

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 216 of file qt_ogre_render_window.cpp.

void rviz::QtOgreRenderWindow::paintEvent ( QPaintEvent *  e) [protected, virtual]

Reimplemented from rviz::RenderWidget.

Definition at line 302 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 330 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 253 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 221 of file qt_ogre_render_window.cpp.

Sets the aspect ratio on the camera

Definition at line 263 of file qt_ogre_render_window.cpp.

Set the scale of the orthographic window. Only valid for an orthographic camera.

Parameters:
scaleThe scale

Definition at line 284 of file qt_ogre_render_window.cpp.

void rviz::QtOgreRenderWindow::setOverlaysEnabled ( bool  overlays_enabled)

Definition at line 243 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

Parameters:
funcThe callback functor

Definition at line 296 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

Parameters:
funcThe callback functor

Definition at line 291 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.

Returns:
A size of 320x240 (just a symbolic 4:3 size).

Definition at line 80 of file qt_ogre_render_window.h.


Member Data Documentation

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.

Definition at line 146 of file qt_ogre_render_window.h.

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.

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.

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.


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


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Thu Jun 6 2019 18:02:17