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 ()
 
DisplayContextgetManager ()
 
ViewControllergetViewController ()
 
void initialize (Ogre::SceneManager *scene_manager, DisplayContext *manager)
 
 RenderPanel (QWidget *parent=0)
 
virtual void sceneManagerDestroyed (Ogre::SceneManager *source)
 
void setViewController (ViewController *controller)
 Set the ViewController which should control the camera position for this view. More...
 
void showContextMenu (boost::shared_ptr< QMenu > menu)
 
virtual ~RenderPanel ()
 
- 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=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. 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...
 
virtual QSize sizeHint () const
 
virtual ~QtOgreRenderWindow ()
 
- Public Member Functions inherited from rviz::RenderWidget
Ogre::RenderWindow * getRenderWindow ()
 
 RenderWidget (RenderSystem *render_system, QWidget *parent=0)
 
virtual ~RenderWidget ()
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void leaveEvent (QEvent *event)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
void onRenderWindowMouseEvents (QMouseEvent *event)
 Called when any mouse event happens inside the render window. More...
 
virtual void wheelEvent (QWheelEvent *event)
 Called when there is a mouse-wheel event. More...
 
- Protected Member Functions inherited from rviz::QtOgreRenderWindow
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 Member Functions inherited from rviz::RenderWidget
virtual void moveEvent (QMoveEvent *e)
 
QPaintEngine * paintEngine () const
 

Protected Attributes

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

Private Slots

void onContextMenuHide ()
 
void sendMouseMoveEvent ()
 

Private Attributes

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

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 75 of file render_panel.h.

Constructor & Destructor Documentation

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

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

Definition at line 48 of file render_panel.cpp.

rviz::RenderPanel::~RenderPanel ( )
virtual

Definition at line 62 of file render_panel.cpp.

Member Function Documentation

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

Definition at line 212 of file render_panel.cpp.

bool rviz::RenderPanel::contextMenuVisible ( )

Return true if the context menu for this panel is visible

Definition at line 207 of file render_panel.cpp.

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

Definition at line 86 of file render_panel.h.

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

Definition at line 88 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 75 of file render_panel.cpp.

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

Definition at line 170 of file render_panel.cpp.

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

Definition at line 125 of file render_panel.cpp.

virtual void rviz::RenderPanel::mouseDoubleClickEvent ( QMouseEvent *  event)
inlineprotectedvirtual

Definition at line 115 of file render_panel.h.

virtual void rviz::RenderPanel::mouseMoveEvent ( QMouseEvent *  event)
inlineprotectedvirtual

Definition at line 112 of file render_panel.h.

virtual void rviz::RenderPanel::mousePressEvent ( QMouseEvent *  event)
inlineprotectedvirtual

Definition at line 113 of file render_panel.h.

virtual void rviz::RenderPanel::mouseReleaseEvent ( QMouseEvent *  event)
inlineprotectedvirtual

Definition at line 114 of file render_panel.h.

void rviz::RenderPanel::onContextMenuHide ( )
privateslot

Definition at line 202 of file render_panel.cpp.

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

Called when any mouse event happens inside the render window.

Definition at line 134 of file render_panel.cpp.

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

Definition at line 227 of file render_panel.cpp.

void rviz::RenderPanel::sendMouseMoveEvent ( )
privateslot

Definition at line 95 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 178 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 193 of file render_panel.cpp.

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

Called when there is a mouse-wheel event.

Definition at line 152 of file render_panel.cpp.

Member Data Documentation

DisplayContext* rviz::RenderPanel::context_
protected

Definition at line 128 of file render_panel.h.

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

Definition at line 133 of file render_panel.h.

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

Definition at line 134 of file render_panel.h.

bool rviz::RenderPanel::context_menu_visible_
protected

Definition at line 136 of file render_panel.h.

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

A default camera created in initialize().

Definition at line 148 of file render_panel.h.

Display* rviz::RenderPanel::display_
protected

Definition at line 140 of file render_panel.h.

QTimer* rviz::RenderPanel::fake_mouse_move_event_timer_
private

Definition at line 147 of file render_panel.h.

int rviz::RenderPanel::mouse_x_
protected

X position of the last mouse event.

Definition at line 125 of file render_panel.h.

int rviz::RenderPanel::mouse_y_
protected

Y position of the last mouse event.

Definition at line 126 of file render_panel.h.

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

Definition at line 129 of file render_panel.h.

ViewController* rviz::RenderPanel::view_controller_
protected

Definition at line 131 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
autogenerated on Sat Apr 27 2019 02:33:43