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

#include <qt_ogre_render_window.h>

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

List of all members.

Public Member Functions

Ogre::Viewport * getViewport () const
 QtOgreRenderWindow (RenderSystem *render_system, 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)
virtual QSize sizeHint () const

Protected Member Functions

virtual void paintEvent (QPaintEvent *e)
virtual void resizeEvent (QResizeEvent *event)
void setCameraAspectRatio ()
virtual void showEvent (QShowEvent *e)

Protected Attributes

bool auto_render_
Ogre::ColourValue background_color_
Ogre::Camera * 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.
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.

One important API difference is that the Ogre::Viewport is not created in the constructor as it was previously. Now it is created in showEvent() which is called by Qt when the widget gets mapped onto the screen. If you get an assertion failure in getViewport(), it is because you called it before showEvent() got called.

Definition at line 32 of file qt_ogre_render_window.h.


Constructor & Destructor Documentation

ogre_tools::QtOgreRenderWindow::QtOgreRenderWindow ( RenderSystem render_system,
QWidget *  parent = 0 
)

Constructor.

Parameters:
parentThe parent wxWindow component.

Definition at line 22 of file qt_ogre_render_window.cpp.


Member Function Documentation

Ogre::Viewport * ogre_tools::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 35 of file qt_ogre_render_window.cpp.

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

Reimplemented from ogre_tools::RenderWidget.

Definition at line 108 of file qt_ogre_render_window.cpp.

void ogre_tools::QtOgreRenderWindow::resizeEvent ( QResizeEvent *  event) [protected, virtual]

Reimplemented from ogre_tools::RenderWidget.

Definition at line 136 of file qt_ogre_render_window.cpp.

void ogre_tools::QtOgreRenderWindow::setAutoRender ( bool  auto_render) [inline]

Definition at line 74 of file qt_ogre_render_window.h.

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

Definition at line 63 of file qt_ogre_render_window.cpp.

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

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

Definition at line 41 of file qt_ogre_render_window.cpp.

Sets the aspect ratio on the camera

Definition at line 72 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 90 of file qt_ogre_render_window.cpp.

Definition at line 54 of file qt_ogre_render_window.cpp.

void ogre_tools::QtOgreRenderWindow::setPostRenderCallback ( boost::function< void()>  func) [virtual]

Set a callback which is called after each render

Parameters:
funcThe callback functor

Definition at line 102 of file qt_ogre_render_window.cpp.

void ogre_tools::QtOgreRenderWindow::setPreRenderCallback ( boost::function< void()>  func) [virtual]

Set a callback which is called before each render

Parameters:
funcThe callback functor

Definition at line 97 of file qt_ogre_render_window.cpp.

void ogre_tools::QtOgreRenderWindow::showEvent ( QShowEvent *  e) [protected, virtual]

Reimplemented from ogre_tools::RenderWidget.

Definition at line 151 of file qt_ogre_render_window.cpp.

virtual QSize ogre_tools::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 54 of file qt_ogre_render_window.h.


Member Data Documentation

Definition at line 102 of file qt_ogre_render_window.h.

Definition at line 106 of file qt_ogre_render_window.h.

Ogre::Camera* ogre_tools::QtOgreRenderWindow::camera_ [protected]

Definition at line 104 of file qt_ogre_render_window.h.

Definition at line 96 of file qt_ogre_render_window.h.

Definition at line 101 of file qt_ogre_render_window.h.

Definition at line 105 of file qt_ogre_render_window.h.

boost::function<void ()> ogre_tools::QtOgreRenderWindow::post_render_callback_ [protected]

Functor which is called after each render.

Definition at line 99 of file qt_ogre_render_window.h.

boost::function<void ()> ogre_tools::QtOgreRenderWindow::pre_render_callback_ [protected]

Functor which is called before each render.

Definition at line 98 of file qt_ogre_render_window.h.

Ogre::Viewport* ogre_tools::QtOgreRenderWindow::viewport_ [protected]

Definition at line 94 of file qt_ogre_render_window.h.


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


ogre_tools_qt
Author(s): Josh Faust
autogenerated on Fri Dec 6 2013 20:56:43