Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rviz::QtOgreRenderWindow Class Reference

#include <qt_ogre_render_window.h>

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

Public Member Functions

bool enableStereo (bool enable)
 Enable or disable stereo rendering If stereo is not supported this is ignored. More...
 
Ogre::Camera * getCamera () const
 
Ogre::Viewport * getViewport () const
 
 QtOgreRenderWindow (QWidget *parent=nullptr)
 
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. More...
 
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. More...
 
QSize sizeHint () const override
 
 ~QtOgreRenderWindow () override
 
- Public Member Functions inherited from rviz::RenderWidget
Ogre::RenderWindow * getRenderWindow ()
 
 RenderWidget (RenderSystem *render_system, QWidget *parent=nullptr)
 
 ~RenderWidget () override
 

Protected Member Functions

void paintEvent (QPaintEvent *e) override
 
void postViewportUpdate (const Ogre::RenderTargetViewportEvent &evt) override
 
void prepareStereoViewport (Ogre::Viewport *)
 
void preViewportUpdate (const Ogre::RenderTargetViewportEvent &evt) override
 
void resizeEvent (QResizeEvent *event) override
 
void setCameraAspectRatio ()
 
- Protected Member Functions inherited from rviz::RenderWidget
void moveEvent (QMoveEvent *e) override
 
QPaintEngine * paintEngine () const override
 
void paintEvent (QPaintEvent *e) override
 
void resizeEvent (QResizeEvent *e) override
 

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. More...
 
boost::function< void()> pre_render_callback_
 Functor which is called before each render. More...
 
bool rendering_stereo_
 
Ogre::Camera * right_camera_
 
Ogre::Viewport * right_viewport_
 
bool stereo_enabled_
 
Ogre::Viewport * viewport_
 
- Protected Attributes inherited from rviz::RenderWidget
qreal pixel_ratio_
 
RenderSystemrender_system_
 
Ogre::RenderWindow * render_window_
 
QFrame * renderFrame
 

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 54 of file qt_ogre_render_window.h.

Constructor & Destructor Documentation

◆ QtOgreRenderWindow()

rviz::QtOgreRenderWindow::QtOgreRenderWindow ( QWidget *  parent = nullptr)

Constructor.

Parameters
parentThe parent wxWindow component.

Definition at line 55 of file qt_ogre_render_window.cpp.

◆ ~QtOgreRenderWindow()

rviz::QtOgreRenderWindow::~QtOgreRenderWindow ( )
override

Destructor.

Definition at line 85 of file qt_ogre_render_window.cpp.

Member Function Documentation

◆ enableStereo()

bool rviz::QtOgreRenderWindow::enableStereo ( bool  enable)

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

◆ getCamera()

Ogre::Camera* rviz::QtOgreRenderWindow::getCamera ( ) const
inline

Definition at line 97 of file qt_ogre_render_window.h.

◆ getViewport()

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

◆ paintEvent()

void rviz::QtOgreRenderWindow::paintEvent ( QPaintEvent *  e)
overrideprotected

Definition at line 300 of file qt_ogre_render_window.cpp.

◆ postViewportUpdate()

void rviz::QtOgreRenderWindow::postViewportUpdate ( const Ogre::RenderTargetViewportEvent &  evt)
overrideprotected

Definition at line 189 of file qt_ogre_render_window.cpp.

◆ prepareStereoViewport()

void rviz::QtOgreRenderWindow::prepareStereoViewport ( Ogre::Viewport *  )
protected

prepare a viewport's camera for stereo rendering. This should only be called from StereoRenderTargetListener

◆ preViewportUpdate()

void rviz::QtOgreRenderWindow::preViewportUpdate ( const Ogre::RenderTargetViewportEvent &  evt)
overrideprotected

Definition at line 144 of file qt_ogre_render_window.cpp.

◆ resizeEvent()

void rviz::QtOgreRenderWindow::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 326 of file qt_ogre_render_window.cpp.

◆ setAutoRender()

void rviz::QtOgreRenderWindow::setAutoRender ( bool  auto_render)
inline

Definition at line 117 of file qt_ogre_render_window.h.

◆ setBackgroundColor()

void rviz::QtOgreRenderWindow::setBackgroundColor ( Ogre::ColourValue  color)

Definition at line 251 of file qt_ogre_render_window.cpp.

◆ setCamera()

void rviz::QtOgreRenderWindow::setCamera ( Ogre::Camera *  camera)

Set the camera associated with this render window's viewport.

Definition at line 219 of file qt_ogre_render_window.cpp.

◆ setCameraAspectRatio()

void rviz::QtOgreRenderWindow::setCameraAspectRatio ( )
protected

Sets the aspect ratio on the camera

Definition at line 261 of file qt_ogre_render_window.cpp.

◆ setOrthoScale()

void rviz::QtOgreRenderWindow::setOrthoScale ( float  scale)

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

Parameters
scaleThe scale

Definition at line 282 of file qt_ogre_render_window.cpp.

◆ setOverlaysEnabled()

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

Definition at line 241 of file qt_ogre_render_window.cpp.

◆ setPostRenderCallback()

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

◆ setPreRenderCallback()

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

◆ setupStereo()

void rviz::QtOgreRenderWindow::setupStereo ( )

Prepare to render in stereo if enabled and supported.

Definition at line 99 of file qt_ogre_render_window.cpp.

◆ sizeHint()

QSize rviz::QtOgreRenderWindow::sizeHint ( ) const
inlineoverride

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

◆ auto_render_

bool rviz::QtOgreRenderWindow::auto_render_
protected

Definition at line 156 of file qt_ogre_render_window.h.

◆ background_color_

Ogre::ColourValue rviz::QtOgreRenderWindow::background_color_
protected

Definition at line 160 of file qt_ogre_render_window.h.

◆ camera_

Ogre::Camera* rviz::QtOgreRenderWindow::camera_
protected

Definition at line 158 of file qt_ogre_render_window.h.

◆ left_camera_

Ogre::Camera* rviz::QtOgreRenderWindow::left_camera_
protected

Definition at line 165 of file qt_ogre_render_window.h.

◆ ogre_root_

Ogre::Root* rviz::QtOgreRenderWindow::ogre_root_
protected

Definition at line 150 of file qt_ogre_render_window.h.

◆ ortho_scale_

float rviz::QtOgreRenderWindow::ortho_scale_
protected

Definition at line 155 of file qt_ogre_render_window.h.

◆ overlays_enabled_

bool rviz::QtOgreRenderWindow::overlays_enabled_
protected

Definition at line 159 of file qt_ogre_render_window.h.

◆ post_render_callback_

boost::function<void()> rviz::QtOgreRenderWindow::post_render_callback_
protected

Functor which is called after each render.

Definition at line 153 of file qt_ogre_render_window.h.

◆ pre_render_callback_

boost::function<void()> rviz::QtOgreRenderWindow::pre_render_callback_
protected

Functor which is called before each render.

Definition at line 152 of file qt_ogre_render_window.h.

◆ rendering_stereo_

bool rviz::QtOgreRenderWindow::rendering_stereo_
protected

Definition at line 164 of file qt_ogre_render_window.h.

◆ right_camera_

Ogre::Camera* rviz::QtOgreRenderWindow::right_camera_
protected

Definition at line 166 of file qt_ogre_render_window.h.

◆ right_viewport_

Ogre::Viewport* rviz::QtOgreRenderWindow::right_viewport_
protected

Definition at line 167 of file qt_ogre_render_window.h.

◆ stereo_enabled_

bool rviz::QtOgreRenderWindow::stereo_enabled_
protected

Definition at line 163 of file qt_ogre_render_window.h.

◆ viewport_

Ogre::Viewport* rviz::QtOgreRenderWindow::viewport_
protected

Definition at line 148 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, William Woodall
autogenerated on Fri Aug 2 2024 08:43:11