42 #include <boost/signals2/signal.hpp>
44 #include <vtkCommand.h>
48 class vtkRenderWindow;
49 class vtkRenderWindowInteractor;
50 class vtkCallbackCommand;
51 class vtkRendererCollection;
52 class PCLVisualizerInteractorStyle;
56 namespace visualization
64 Window (
const std::string& window_name =
"");
80 spinOnce (
int time = 1,
bool force_redraw =
false);
92 boost::signals2::connection
94 void* cookie =
nullptr)
106 template<
typename T> boost::signals2::connection
108 T& instance,
void* cookie =
nullptr)
119 boost::signals2::connection
121 void* cookie =
nullptr)
133 template<
typename T> boost::signals2::connection
135 T& instance,
void* cookie =
nullptr)
151 boost::signals2::connection
159 boost::signals2::connection
170 MouseCallback (vtkObject*,
unsigned long eid,
void* clientdata,
void *calldata);
185 Execute (vtkObject*,
unsigned long event_id,
void* call_data)
override;
187 int right_timer_id{-1};
201 Execute (vtkObject*,
unsigned long event_id,
void*)
override;
206 bool stopped_{
false};
/brief Class representing key hit/release events
vtkSmartPointer< vtkRenderWindowInteractor > interactor_
Window(const std::string &window_name="")
boost::signals2::connection registerMouseCallback(void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=nullptr)
void spinOnce(int time=1, bool force_redraw=false)
Spin once method.
boost::signals2::connection registerMouseCallback(void(T::*callback)(const pcl::visualization::MouseEvent &, void *), T &instance, void *cookie=nullptr)
registering a callback function for mouse events
static void MouseCallback(vtkObject *, unsigned long eid, void *clientdata, void *calldata)
vtkSmartPointer< ExitCallback > exit_callback_
void emitKeyboardEvent(unsigned long event_id)
boost::signals2::connection registerKeyboardCallback(void(T::*callback)(const pcl::visualization::KeyboardEvent &, void *), T &instance, void *cookie=nullptr)
registering a callback function for keyboard events
boost::signals2::connection registerKeyboardCallback(void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=nullptr)
registering a callback function for keyboard events
vtkSmartPointer< ExitMainLoopTimerCallback > exit_main_loop_timer_callback_
void emitMouseEvent(unsigned long event_id)
static void KeyboardCallback(vtkObject *, unsigned long eid, void *clientdata, void *calldata)
boost::signals2::signal< void(const pcl::visualization::KeyboardEvent &)> keyboard_signal_
boost::signals2::signal< void(const pcl::visualization::MouseEvent &)> mouse_signal_
vtkCallbackCommand * keyboard_command_
Window(const Window &src)
boost::signals2::connection registerKeyboardCallback(std::function< void(const pcl::visualization::KeyboardEvent &)>)
registering a callback std::function for keyboard events
vtkSmartPointer< vtkRendererCollection > rens_
The collection of renderers used.
vtkSmartPointer< PCLVisualizerInteractorStyle > style_
The render window interactor style.
vtkSmartPointer< vtkRenderWindow > win_
vtkCallbackCommand * mouse_command_
bool wasStopped() const
Returns true when the user tried to close the window.
boost::signals2::connection registerMouseCallback(std::function< void(const pcl::visualization::MouseEvent &)>)
registering a callback function for mouse events
void resetStoppedFlag()
Set the stopped flag back to false.
Defines all the PCL and non-PCL macros used.
static ExitCallback * New()
void Execute(vtkObject *, unsigned long event_id, void *) override
ExitMainLoopTimerCallback()
void Execute(vtkObject *, unsigned long event_id, void *call_data) override
static ExitMainLoopTimerCallback * New()