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

Method createInteractor

visualization/src/pcl_visualizer.cpp:286–326  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

284
285/////////////////////////////////////////////////////////////////////////////////////////////
286void
287pcl::visualization::PCLVisualizer::createInteractor ()
288{
289 //interactor_ = vtkSmartPointer<vtkRenderWindowInteractor>::New ();
290 interactor_ = vtkSmartPointer <vtkRenderWindowInteractor>::Take (vtkRenderWindowInteractorFixNew ());
291
292 //win_->PointSmoothingOn ();
293 //win_->LineSmoothingOn ();
294 //win_->PolygonSmoothingOn ();
295 win_->AlphaBitPlanesOff ();
296 win_->PointSmoothingOff ();
297 win_->LineSmoothingOff ();
298 win_->PolygonSmoothingOff ();
299 win_->SwapBuffersOn ();
300 win_->SetStereoTypeToAnaglyph ();
301
302 interactor_->SetRenderWindow (win_);
303 interactor_->SetInteractorStyle (style_);
304 //interactor_->SetStillUpdateRate (30.0);
305 interactor_->SetDesiredUpdateRate (30.0);
306
307 // Initialize and create timer, also create window
308 interactor_->Initialize ();
309 timer_id_ = interactor_->CreateRepeatingTimer (5000L);
310
311 // Set a simple PointPicker
312 vtkSmartPointer<vtkPointPicker> pp = vtkSmartPointer<vtkPointPicker>::New ();
313 pp->SetTolerance (pp->GetTolerance () * 2);
314 interactor_->SetPicker (pp);
315
316 exit_main_loop_timer_callback_ = vtkSmartPointer<ExitMainLoopTimerCallback>::New ();
317 exit_main_loop_timer_callback_->pcl_visualizer = this;
318 exit_main_loop_timer_callback_->right_timer_id = -1;
319 interactor_->AddObserver (vtkCommand::TimerEvent, exit_main_loop_timer_callback_);
320
321 exit_callback_ = vtkSmartPointer<ExitCallback>::New ();
322 exit_callback_->pcl_visualizer = this;
323 interactor_->AddObserver (vtkCommand::ExitEvent, exit_callback_);
324
325 resetStoppedFlag ();
326}
327
328/////////////////////////////////////////////////////////////////////////////////////////////
329void

Callers

nothing calls this directly

Calls 5

NewFunction · 0.85
resetStoppedFlagFunction · 0.85
SetToleranceMethod · 0.80
InitializeMethod · 0.45

Tested by

no test coverage detected