MCPcopy Create free account
hub / github.com/Kitware/VTK / OnMenu3D

Method OnMenu3D

Rendering/VR/vtkVRInteractorStyle.cxx:316–339  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

314
315//------------------------------------------------------------------------------
316void vtkVRInteractorStyle::OnMenu3D(vtkEventData* edata)
317{
318 vtkEventDataDevice3D* edd = edata->GetAsEventDataDevice3D();
319 if (!edd)
320 {
321 return;
322 }
323
324 int x = this->Interactor->GetEventPosition()[0];
325 int y = this->Interactor->GetEventPosition()[1];
326 this->FindPokedRenderer(x, y);
327
328 if (edd->GetAction() == vtkEventDataAction::Press)
329 {
330 this->StartAction(VTKIS_MENU, edd);
331 return;
332 }
333
334 if (edd->GetAction() == vtkEventDataAction::Release)
335 {
336 this->EndAction(VTKIS_MENU, edd);
337 return;
338 }
339}
340
341//------------------------------------------------------------------------------
342// Interaction entry points

Callers

nothing calls this directly

Calls 5

StartActionMethod · 0.95
EndActionMethod · 0.95
GetActionMethod · 0.80
FindPokedRendererMethod · 0.45

Tested by

no test coverage detected