------------------------------------------------------------------------------
| 483 | |
| 484 | //------------------------------------------------------------------------------ |
| 485 | void vtkSphereWidget::OnRightButtonDown() |
| 486 | { |
| 487 | if (!this->Interactor) |
| 488 | { |
| 489 | return; |
| 490 | } |
| 491 | |
| 492 | this->State = vtkSphereWidget::Scaling; |
| 493 | |
| 494 | int X = this->Interactor->GetEventPosition()[0]; |
| 495 | int Y = this->Interactor->GetEventPosition()[1]; |
| 496 | |
| 497 | // Okay, make sure that the pick is in the current renderer |
| 498 | if (!this->CurrentRenderer || !this->CurrentRenderer->IsInViewport(X, Y)) |
| 499 | { |
| 500 | this->State = vtkSphereWidget::Outside; |
| 501 | return; |
| 502 | } |
| 503 | |
| 504 | // Okay, we can process this. Try to pick handles first; |
| 505 | // if no handles picked, then pick the bounding box. |
| 506 | vtkAssemblyPath* path = this->GetAssemblyPath(X, Y, 0., this->Picker); |
| 507 | |
| 508 | if (path == nullptr) |
| 509 | { |
| 510 | this->State = vtkSphereWidget::Outside; |
| 511 | this->HighlightSphere(0); |
| 512 | return; |
| 513 | } |
| 514 | else |
| 515 | { |
| 516 | this->HighlightSphere(1); |
| 517 | } |
| 518 | |
| 519 | this->EventCallbackCommand->SetAbortFlag(1); |
| 520 | this->StartInteraction(); |
| 521 | this->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr); |
| 522 | this->Interactor->Render(); |
| 523 | } |
| 524 | |
| 525 | //------------------------------------------------------------------------------ |
| 526 | void vtkSphereWidget::OnRightButtonUp() |
no test coverage detected