Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | Private Attributes | List of all members
rviz::RenderPanel Class Reference

#include <render_panel.h>

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

Public Member Functions

bool contextMenuVisible ()
 
bool getFocusOnMouseMove () const
 
DisplayContextgetManager ()
 
ViewControllergetViewController ()
 
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

DisplayContextcontext_
 
boost::shared_ptr< QMenu > context_menu_
 
boost::mutex context_menu_mutex_
 
bool context_menu_visible_
 
Displaydisplay_
 
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_
 
ViewControllerview_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_
 
RenderSystemrender_system_
 
Ogre::RenderWindow * render_window_
 
QFrame * renderFrame
 

Private Slots

void onContextMenuHide ()
 

Private Attributes

Ogre::Camera * default_camera_
 A default camera created in initialize(). More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RenderPanel()

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

Constructor. Ogre::Root::createRenderWindow() is called within.

Definition at line 49 of file render_panel.cpp.

◆ ~RenderPanel()

rviz::RenderPanel::~RenderPanel ( )
override

Definition at line 65 of file render_panel.cpp.

Member Function Documentation

◆ contextMenuEvent()

void rviz::RenderPanel::contextMenuEvent ( QContextMenuEvent *  event)
overrideprotected

Definition at line 187 of file render_panel.cpp.

◆ contextMenuVisible()

bool rviz::RenderPanel::contextMenuVisible ( )

Return true if the context menu for this panel is visible

Definition at line 182 of file render_panel.cpp.

◆ getFocusOnMouseMove()

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.

◆ getManager()

DisplayContext* rviz::RenderPanel::getManager ( )
inline

Definition at line 85 of file render_panel.h.

◆ getViewController()

ViewController* rviz::RenderPanel::getViewController ( )
inline

Definition at line 90 of file render_panel.h.

◆ initialize()

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.

◆ keyPressEvent()

void rviz::RenderPanel::keyPressEvent ( QKeyEvent *  event)
overrideprotected

Definition at line 145 of file render_panel.cpp.

◆ leaveEvent()

void rviz::RenderPanel::leaveEvent ( QEvent *  event)
overrideprotected

Definition at line 94 of file render_panel.cpp.

◆ mouseDoubleClickEvent()

void rviz::RenderPanel::mouseDoubleClickEvent ( QMouseEvent *  event)
inlineoverrideprotected

Definition at line 135 of file render_panel.h.

◆ mouseMoveEvent()

void rviz::RenderPanel::mouseMoveEvent ( QMouseEvent *  event)
inlineoverrideprotected

Definition at line 123 of file render_panel.h.

◆ mousePressEvent()

void rviz::RenderPanel::mousePressEvent ( QMouseEvent *  event)
inlineoverrideprotected

Definition at line 127 of file render_panel.h.

◆ mouseReleaseEvent()

void rviz::RenderPanel::mouseReleaseEvent ( QMouseEvent *  event)
inlineoverrideprotected

Definition at line 131 of file render_panel.h.

◆ onContextMenuHide

void rviz::RenderPanel::onContextMenuHide ( )
privateslot

Definition at line 177 of file render_panel.cpp.

◆ onRenderWindowMouseEvents()

void rviz::RenderPanel::onRenderWindowMouseEvents ( QMouseEvent *  event)
protected

Called when any mouse event happens inside the render window.

Definition at line 103 of file render_panel.cpp.

◆ sceneManagerDestroyed()

void rviz::RenderPanel::sceneManagerDestroyed ( Ogre::SceneManager *  source)
override

Definition at line 202 of file render_panel.cpp.

◆ setFocusOnMouseMove()

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.

◆ setViewController()

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.

◆ showContextMenu()

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.

◆ wheelEvent()

void rviz::RenderPanel::wheelEvent ( QWheelEvent *  event)
overrideprotected

Called when there is a mouse-wheel event.

Definition at line 124 of file render_panel.cpp.

Member Data Documentation

◆ context_

DisplayContext* rviz::RenderPanel::context_
protected

Definition at line 152 of file render_panel.h.

◆ context_menu_

boost::shared_ptr<QMenu> rviz::RenderPanel::context_menu_
protected

Definition at line 157 of file render_panel.h.

◆ context_menu_mutex_

boost::mutex rviz::RenderPanel::context_menu_mutex_
protected

Definition at line 158 of file render_panel.h.

◆ context_menu_visible_

bool rviz::RenderPanel::context_menu_visible_
protected

Definition at line 160 of file render_panel.h.

◆ default_camera_

Ogre::Camera* rviz::RenderPanel::default_camera_
private

A default camera created in initialize().

Definition at line 170 of file render_panel.h.

◆ display_

Display* rviz::RenderPanel::display_
protected

Definition at line 164 of file render_panel.h.

◆ focus_on_mouse_move_

bool rviz::RenderPanel::focus_on_mouse_move_
protected

a moving the mouse catches keyboard focus

Definition at line 150 of file render_panel.h.

◆ mouse_x_

int rviz::RenderPanel::mouse_x_
protected

X position of the last mouse event.

Definition at line 148 of file render_panel.h.

◆ mouse_y_

int rviz::RenderPanel::mouse_y_
protected

Y position of the last mouse event.

Definition at line 149 of file render_panel.h.

◆ scene_manager_

Ogre::SceneManager* rviz::RenderPanel::scene_manager_
protected

Definition at line 153 of file render_panel.h.

◆ view_controller_

ViewController* rviz::RenderPanel::view_controller_
protected

Definition at line 155 of file render_panel.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