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

Method OnRightButtonDown

Interaction/Widgets/vtkBoxWidget.cxx:693–737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

691}
692
693void vtkBoxWidget::OnRightButtonDown()
694{
695 int X = this->Interactor->GetEventPosition()[0];
696 int Y = this->Interactor->GetEventPosition()[1];
697
698 // Okay, we can process this. Try to pick handles first;
699 // if no handles picked, then pick the bounding box.
700 if (!this->CurrentRenderer || !this->CurrentRenderer->IsInViewport(X, Y))
701 {
702 this->State = vtkBoxWidget::Outside;
703 return;
704 }
705
706 vtkAssemblyPath* path = this->GetAssemblyPath(X, Y, 0., this->HandlePicker);
707
708 if (path != nullptr)
709 {
710 this->State = vtkBoxWidget::Scaling;
711 this->HighlightOutline(1);
712 this->HandlePicker->GetPickPosition(this->LastPickPosition);
713 this->ValidPick = 1;
714 }
715 else
716 {
717 path = this->GetAssemblyPath(X, Y, 0., this->HexPicker);
718
719 if (path != nullptr)
720 {
721 this->State = vtkBoxWidget::Scaling;
722 this->HighlightOutline(1);
723 this->HexPicker->GetPickPosition(this->LastPickPosition);
724 this->ValidPick = 1;
725 }
726 else
727 {
728 this->State = vtkBoxWidget::Outside;
729 return;
730 }
731 }
732
733 this->EventCallbackCommand->SetAbortFlag(1);
734 this->StartInteraction();
735 this->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr);
736 this->Interactor->Render();
737}
738
739void vtkBoxWidget::OnRightButtonUp()
740{

Callers 1

ProcessEventsMethod · 0.95

Calls 7

HighlightOutlineMethod · 0.95
IsInViewportMethod · 0.80
GetPickPositionMethod · 0.80
InvokeEventMethod · 0.80
RenderMethod · 0.65
GetAssemblyPathMethod · 0.45
StartInteractionMethod · 0.45

Tested by

no test coverage detected