#include <render_panel.h>
Public Member Functions | |
bool | contextMenuVisible () |
bool | getFocusOnMouseMove () const |
DisplayContext * | getManager () |
ViewController * | getViewController () |
void | initialize (Ogre::SceneManager *scene_manager, DisplayContext *manager) |
RenderPanel (QWidget *parent=nullptr) | |
void | sceneManagerDestroyed (Ogre::SceneManager *source) override |
void | setFocusOnMouseMove (bool enabled) |
void | setViewController (ViewController *controller) |
Set the ViewController which should control the camera position for this view. More... | |
void | showContextMenu (boost::shared_ptr< QMenu > menu) |
~RenderPanel () override | |
Public Member Functions inherited from rviz::QtOgreRenderWindow | |
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 | contextMenuEvent (QContextMenuEvent *event) override |
void | keyPressEvent (QKeyEvent *event) override |
void | leaveEvent (QEvent *event) override |
void | mouseDoubleClickEvent (QMouseEvent *event) override |
void | mouseMoveEvent (QMouseEvent *event) override |
void | mousePressEvent (QMouseEvent *event) override |
void | mouseReleaseEvent (QMouseEvent *event) override |
void | onRenderWindowMouseEvents (QMouseEvent *event) |
Called when any mouse event happens inside the render window. More... | |
void | wheelEvent (QWheelEvent *event) override |
Called when there is a mouse-wheel event. More... | |
Protected Member Functions inherited from rviz::QtOgreRenderWindow | |
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 | |
DisplayContext * | context_ |
boost::shared_ptr< QMenu > | context_menu_ |
boost::mutex | context_menu_mutex_ |
bool | context_menu_visible_ |
Display * | display_ |
bool | focus_on_mouse_move_ |
a moving the mouse catches keyboard focus More... | |
int | mouse_x_ |
X position of the last mouse event. More... | |
int | mouse_y_ |
Y position of the last mouse event. More... | |
Ogre::SceneManager * | scene_manager_ |
ViewController * | view_controller_ |
Protected Attributes inherited from rviz::QtOgreRenderWindow | |
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_ |
RenderSystem * | render_system_ |
Ogre::RenderWindow * | render_window_ |
QFrame * | renderFrame |
Private Slots | |
void | onContextMenuHide () |
Private Attributes | |
Ogre::Camera * | default_camera_ |
A default camera created in initialize(). More... | |
A widget which shows an OGRE-rendered scene in RViz.
RenderPanel displays a scene and forwards mouse and key events to the DisplayContext (which further forwards them to the active Tool, etc.)
Definition at line 74 of file render_panel.h.
rviz::RenderPanel::RenderPanel | ( | QWidget * | parent = nullptr | ) |
Constructor. Ogre::Root::createRenderWindow() is called within.
Definition at line 49 of file render_panel.cpp.
|
override |
Definition at line 65 of file render_panel.cpp.
|
overrideprotected |
Definition at line 187 of file render_panel.cpp.
bool rviz::RenderPanel::contextMenuVisible | ( | ) |
Return true if the context menu for this panel is visible
Definition at line 182 of file render_panel.cpp.
bool rviz::RenderPanel::getFocusOnMouseMove | ( | ) | const |
Return true if moving the mouse within this widget should set keyboard focus
Definition at line 212 of file render_panel.cpp.
|
inline |
Definition at line 85 of file render_panel.h.
|
inline |
Definition at line 90 of file render_panel.h.
void rviz::RenderPanel::initialize | ( | Ogre::SceneManager * | scene_manager, |
DisplayContext * | manager | ||
) |
This sets up the Ogre::Camera for this widget.
Definition at line 77 of file render_panel.cpp.
|
overrideprotected |
Definition at line 145 of file render_panel.cpp.
|
overrideprotected |
Definition at line 94 of file render_panel.cpp.
|
inlineoverrideprotected |
Definition at line 135 of file render_panel.h.
|
inlineoverrideprotected |
Definition at line 123 of file render_panel.h.
|
inlineoverrideprotected |
Definition at line 127 of file render_panel.h.
|
inlineoverrideprotected |
Definition at line 131 of file render_panel.h.
|
privateslot |
Definition at line 177 of file render_panel.cpp.
|
protected |
Called when any mouse event happens inside the render window.
Definition at line 103 of file render_panel.cpp.
|
override |
Definition at line 202 of file render_panel.cpp.
void rviz::RenderPanel::setFocusOnMouseMove | ( | bool | enabled | ) |
Set to true if moving the mouse within this widget should set keyboard focus, default true
Definition at line 217 of file render_panel.cpp.
void rviz::RenderPanel::setViewController | ( | ViewController * | controller | ) |
Set the ViewController which should control the camera position for this view.
Definition at line 153 of file render_panel.cpp.
void rviz::RenderPanel::showContextMenu | ( | boost::shared_ptr< QMenu > | menu | ) |
Show the given menu as a context menu, positioned based on the current mouse position. This can be called from any thread.
Definition at line 168 of file render_panel.cpp.
|
overrideprotected |
Called when there is a mouse-wheel event.
Definition at line 124 of file render_panel.cpp.
|
protected |
Definition at line 152 of file render_panel.h.
|
protected |
Definition at line 157 of file render_panel.h.
|
protected |
Definition at line 158 of file render_panel.h.
|
protected |
Definition at line 160 of file render_panel.h.
|
private |
A default camera created in initialize().
Definition at line 170 of file render_panel.h.
|
protected |
Definition at line 164 of file render_panel.h.
|
protected |
a moving the mouse catches keyboard focus
Definition at line 150 of file render_panel.h.
|
protected |
X position of the last mouse event.
Definition at line 148 of file render_panel.h.
|
protected |
Y position of the last mouse event.
Definition at line 149 of file render_panel.h.
|
protected |
Definition at line 153 of file render_panel.h.
|
protected |
Definition at line 155 of file render_panel.h.