Point Cloud Library (PCL)
1.7.1
|
PCLVisualizerInteractorStyle defines an unique, custom VTK based interactory style for PCL Visualizer applications. More...
#include <pcl/visualization/interactor_style.h>
Public Member Functions | |
PCLVisualizerInteractorStyle () | |
Empty constructor. More... | |
virtual | ~PCLVisualizerInteractorStyle () |
Empty destructor. More... | |
vtkTypeMacro (PCLVisualizerInteractorStyle, vtkInteractorStyleRubberBandPick) | |
virtual void | Initialize () |
Initialization routine. More... | |
void | setCloudActorMap (const CloudActorMapPtr &actors) |
Pass a pointer to the actor map. More... | |
CloudActorMapPtr | getCloudActorMap () |
Get the cloud actor map pointer. More... | |
void | setRendererCollection (vtkSmartPointer< vtkRendererCollection > &rens) |
Pass a set of renderers to the interactor style. More... | |
void | setUseVbos (const bool use_vbos) |
Pass a pointer to the actor map. More... | |
boost::signals2::connection | registerMouseCallback (boost::function< void(const pcl::visualization::MouseEvent &)> cb) |
Register a callback function for mouse events. More... | |
boost::signals2::connection | registerKeyboardCallback (boost::function< void(const pcl::visualization::KeyboardEvent &)> cb) |
Register a callback boost::function for keyboard events. More... | |
boost::signals2::connection | registerPointPickingCallback (boost::function< void(const pcl::visualization::PointPickingEvent &)> cb) |
Register a callback function for point picking events. More... | |
boost::signals2::connection | registerAreaPickingCallback (boost::function< void(const pcl::visualization::AreaPickingEvent &)> cb) |
Register a callback function for area picking events. More... | |
void | saveScreenshot (const std::string &file) |
Save the current rendered image to disk, as a PNG screenshot. More... | |
void | setKeyboardModifier (const InteractorKeyboardModifier &modifier) |
Change the default keyboard modified from ALT to a different special key. More... | |
Static Public Member Functions | |
static PCLVisualizerInteractorStyle * | New () |
Protected Member Functions | |
virtual void | OnChar () |
Interactor style internal method. More... | |
virtual void | OnKeyDown () |
virtual void | OnKeyUp () |
virtual void | OnMouseMove () |
virtual void | OnLeftButtonDown () |
virtual void | OnLeftButtonUp () |
virtual void | OnMiddleButtonDown () |
virtual void | OnMiddleButtonUp () |
virtual void | OnRightButtonDown () |
virtual void | OnRightButtonUp () |
virtual void | OnMouseWheelForward () |
virtual void | OnMouseWheelBackward () |
virtual void | OnTimer () |
Interactor style internal method. More... | |
void | zoomIn () |
Interactor style internal method. More... | |
void | zoomOut () |
Interactor style internal method. More... | |
Protected Attributes | |
bool | init_ |
Set to true after initialization is complete. More... | |
vtkSmartPointer< vtkRendererCollection > | rens_ |
Collection of vtkRenderers stored internally. More... | |
CloudActorMapPtr | actors_ |
Actor map stored internally. More... | |
int | win_height_ |
The current window width/height. More... | |
int | win_width_ |
int | win_pos_x_ |
The current window position x/y. More... | |
int | win_pos_y_ |
int | max_win_height_ |
The maximum resizeable window width/height. More... | |
int | max_win_width_ |
bool | use_vbos_ |
The maximum resizeable window width/height. More... | |
bool | grid_enabled_ |
Set to true if the grid actor is enabled. More... | |
vtkSmartPointer< vtkLegendScaleActor > | grid_actor_ |
Actor for 2D grid on screen. More... | |
bool | lut_enabled_ |
Set to true if the LUT actor is enabled. More... | |
vtkSmartPointer< vtkScalarBarActor > | lut_actor_ |
Actor for 2D lookup table on screen. More... | |
vtkSmartPointer< vtkPNGWriter > | snapshot_writer_ |
A PNG writer for screenshot captures. More... | |
vtkSmartPointer< vtkWindowToImageFilter > | wif_ |
Internal window to image filter. More... | |
vtkSmartPointer< vtkPointPicker > | point_picker_ |
Stores the point picker when switching to an area picker. More... | |
boost::signals2::signal< void(const pcl::visualization::MouseEvent &)> | mouse_signal_ |
boost::signals2::signal< void(const pcl::visualization::KeyboardEvent &)> | keyboard_signal_ |
boost::signals2::signal< void(const pcl::visualization::PointPickingEvent &)> | point_picking_signal_ |
boost::signals2::signal< void(const pcl::visualization::AreaPickingEvent &)> | area_picking_signal_ |
bool | stereo_anaglyph_mask_default_ |
True if we're using red-blue colors for anaglyphic stereo, false if magenta-green. More... | |
vtkSmartPointer< PointPickingCallback > | mouse_callback_ |
A VTK Mouse Callback object, used for point picking. More... | |
InteractorKeyboardModifier | modifier_ |
The keyboard modifier to use. More... | |
Friends | |
class | PointPickingCallback |
PCLVisualizerInteractorStyle defines an unique, custom VTK based interactory style for PCL Visualizer applications.
Besides defining the rendering style, we also create a list of custom actions that are triggered on different keys being pressed:
Definition at line 105 of file interactor_style.h.
|
inline |
Empty constructor.
Definition at line 113 of file interactor_style.h.
|
inlinevirtual |
Empty destructor.
Definition at line 122 of file interactor_style.h.
|
inline |
Get the cloud actor map pointer.
Definition at line 139 of file interactor_style.h.
|
virtual |
Initialization routine.
Must be called before anything else.
|
static |
|
protectedvirtual |
Interactor style internal method.
Gets called whenever a key is pressed.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Interactor style internal method.
Gets called periodically if a timer is set.
boost::signals2::connection pcl::visualization::PCLVisualizerInteractorStyle::registerAreaPickingCallback | ( | boost::function< void(const pcl::visualization::AreaPickingEvent &)> | cb | ) |
Register a callback function for area picking events.
[in] | cb | a boost function that will be registered as a callback for a area picking event |
boost::signals2::connection pcl::visualization::PCLVisualizerInteractorStyle::registerKeyboardCallback | ( | boost::function< void(const pcl::visualization::KeyboardEvent &)> | cb | ) |
Register a callback boost::function for keyboard events.
[in] | cb | a boost function that will be registered as a callback for a keyboard event |
boost::signals2::connection pcl::visualization::PCLVisualizerInteractorStyle::registerMouseCallback | ( | boost::function< void(const pcl::visualization::MouseEvent &)> | cb | ) |
Register a callback function for mouse events.
[in] | cb | a boost function that will be registered as a callback for a mouse event |
boost::signals2::connection pcl::visualization::PCLVisualizerInteractorStyle::registerPointPickingCallback | ( | boost::function< void(const pcl::visualization::PointPickingEvent &)> | cb | ) |
Register a callback function for point picking events.
[in] | cb | a boost function that will be registered as a callback for a point picking event |
void pcl::visualization::PCLVisualizerInteractorStyle::saveScreenshot | ( | const std::string & | file | ) |
Save the current rendered image to disk, as a PNG screenshot.
[in] | file | the name of the PNG file |
|
inline |
Pass a pointer to the actor map.
[in] | actors | the actor map that will be used with this style |
Definition at line 135 of file interactor_style.h.
|
inline |
Change the default keyboard modified from ALT to a different special key.
Allowed values are:
[in] | modifier | the new keyboard modifier |
Definition at line 195 of file interactor_style.h.
|
inline |
Pass a set of renderers to the interactor style.
[in] | rens | the vtkRendererCollection to use |
Definition at line 145 of file interactor_style.h.
|
inline |
Pass a pointer to the actor map.
[in] | actors | the actor map that will be used with this style |
Definition at line 151 of file interactor_style.h.
pcl::visualization::PCLVisualizerInteractorStyle::vtkTypeMacro | ( | PCLVisualizerInteractorStyle | , |
vtkInteractorStyleRubberBandPick | |||
) |
|
protected |
Interactor style internal method.
Zoom in.
|
protected |
Interactor style internal method.
Zoom out.
|
friend |
Definition at line 296 of file interactor_style.h.
|
protected |
Actor map stored internally.
Definition at line 208 of file interactor_style.h.
|
protected |
Definition at line 242 of file interactor_style.h.
|
protected |
Actor for 2D grid on screen.
Definition at line 225 of file interactor_style.h.
|
protected |
Set to true if the grid actor is enabled.
Definition at line 223 of file interactor_style.h.
|
protected |
Set to true after initialization is complete.
Definition at line 202 of file interactor_style.h.
|
protected |
Definition at line 240 of file interactor_style.h.
|
protected |
Actor for 2D lookup table on screen.
Definition at line 230 of file interactor_style.h.
|
protected |
Set to true if the LUT actor is enabled.
Definition at line 228 of file interactor_style.h.
|
protected |
The maximum resizeable window width/height.
Definition at line 217 of file interactor_style.h.
|
protected |
Definition at line 217 of file interactor_style.h.
|
protected |
|
protected |
A VTK Mouse Callback object, used for point picking.
Definition at line 291 of file interactor_style.h.
|
protected |
Definition at line 239 of file interactor_style.h.
|
protected |
Stores the point picker when switching to an area picker.
Definition at line 237 of file interactor_style.h.
|
protected |
Definition at line 241 of file interactor_style.h.
|
protected |
Collection of vtkRenderers stored internally.
Definition at line 205 of file interactor_style.h.
|
protected |
A PNG writer for screenshot captures.
Definition at line 233 of file interactor_style.h.
|
protected |
True if we're using red-blue colors for anaglyphic stereo, false if magenta-green.
Definition at line 288 of file interactor_style.h.
|
protected |
The maximum resizeable window width/height.
Definition at line 220 of file interactor_style.h.
|
protected |
Internal window to image filter.
Needed by snapshot_writer_.
Definition at line 235 of file interactor_style.h.
|
protected |
The current window width/height.
Definition at line 211 of file interactor_style.h.
|
protected |
The current window position x/y.
Definition at line 214 of file interactor_style.h.
|
protected |
Definition at line 214 of file interactor_style.h.
|
protected |
Definition at line 211 of file interactor_style.h.