MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / registerMouseCallback

Method registerMouseCallback

visualization/src/window.cpp:191–208  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

189
190/////////////////////////////////////////////////////////////////////////////////////////////
191boost::signals2::connection
192pcl::visualization::Window::registerMouseCallback (std::function<void (const pcl::visualization::MouseEvent&)> callback)
193{
194 // just add observer at first time when a callback is registered
195 if (mouse_signal_.empty ())
196 {
197 interactor_->AddObserver (vtkCommand::MouseMoveEvent, mouse_command_);
198 interactor_->AddObserver (vtkCommand::MiddleButtonPressEvent, mouse_command_);
199 interactor_->AddObserver (vtkCommand::MiddleButtonReleaseEvent, mouse_command_);
200 interactor_->AddObserver (vtkCommand::MouseWheelBackwardEvent, mouse_command_);
201 interactor_->AddObserver (vtkCommand::MouseWheelForwardEvent, mouse_command_);
202 interactor_->AddObserver (vtkCommand::LeftButtonPressEvent, mouse_command_);
203 interactor_->AddObserver (vtkCommand::LeftButtonReleaseEvent, mouse_command_);
204 interactor_->AddObserver (vtkCommand::RightButtonPressEvent, mouse_command_);
205 interactor_->AddObserver (vtkCommand::RightButtonReleaseEvent, mouse_command_);
206 }
207 return (mouse_signal_.connect (callback));
208}
209
210/////////////////////////////////////////////////////////////////////////////////////////////
211boost::signals2::connection

Callers 11

runMethod · 0.45
runMethod · 0.45
receiveAndViewMethod · 0.45
mainFunction · 0.45
runMethod · 0.45
mainFunction · 0.45
runMethod · 0.45
initMethod · 0.45
runMethod · 0.45
initGUIMethod · 0.45

Calls 2

emptyMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected