| 390 | } |
| 391 | |
| 392 | void vtkPointWidget::OnRightButtonDown() |
| 393 | { |
| 394 | int X = this->Interactor->GetEventPosition()[0]; |
| 395 | int Y = this->Interactor->GetEventPosition()[1]; |
| 396 | |
| 397 | // Okay, make sure that the pick is in the current renderer |
| 398 | if (!this->CurrentRenderer || !this->CurrentRenderer->IsInViewport(X, Y)) |
| 399 | { |
| 400 | this->State = vtkPointWidget::Outside; |
| 401 | return; |
| 402 | } |
| 403 | |
| 404 | // Okay, we can process this. Pick the cursor. |
| 405 | vtkAssemblyPath* path = this->GetAssemblyPath(X, Y, 0., this->CursorPicker); |
| 406 | |
| 407 | if (path != nullptr) |
| 408 | { |
| 409 | this->State = vtkPointWidget::Scaling; |
| 410 | int idx = this->CursorPicker->GetCellId(); |
| 411 | if (idx >= 0 && idx < 3) |
| 412 | { |
| 413 | this->ConstraintAxis = idx; |
| 414 | } |
| 415 | this->Highlight(1); |
| 416 | } |
| 417 | else |
| 418 | { |
| 419 | this->State = vtkPointWidget::Outside; |
| 420 | this->ConstraintAxis = -1; |
| 421 | return; |
| 422 | } |
| 423 | |
| 424 | this->EventCallbackCommand->SetAbortFlag(1); |
| 425 | this->StartInteraction(); |
| 426 | this->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr); |
| 427 | this->Interactor->Render(); |
| 428 | } |
| 429 | |
| 430 | void vtkPointWidget::OnRightButtonUp() |
| 431 | { |
no test coverage detected