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

Method ConstructMouseEvent

Views/Context2D/vtkContextInteractorStyle.cxx:477–485  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

475
476//------------------------------------------------------------------------------
477void vtkContextInteractorStyle::ConstructMouseEvent(vtkContextMouseEvent& event, int button)
478{
479 event.SetInteractor(this->Interactor);
480 event.SetScreenPos(vtkVector2i(this->Interactor->GetEventPosition()));
481 event.SetScenePos(vtkVector2f(event.GetScreenPos()[0] - this->Scene->GetSceneLeft(),
482 event.GetScreenPos()[1] - this->Scene->GetSceneBottom()));
483 event.SetPos(event.GetScenePos());
484 event.SetButton(button);
485}
486VTK_ABI_NAMESPACE_END

Callers 12

OnMouseMoveMethod · 0.95
OnLeftButtonDownMethod · 0.95
OnLeftButtonUpMethod · 0.95
OnMiddleButtonDownMethod · 0.95
OnMiddleButtonUpMethod · 0.95
OnRightButtonDownMethod · 0.95
OnRightButtonUpMethod · 0.95
OnMouseWheelForwardMethod · 0.95
OnMouseWheelBackwardMethod · 0.95

Calls 5

GetSceneLeftMethod · 0.80
GetSceneBottomMethod · 0.80
vtkVector2iClass · 0.50
vtkVector2fClass · 0.50
SetInteractorMethod · 0.45

Tested by

no test coverage detected