| 340 | } |
| 341 | |
| 342 | void vtkPointWidget::OnMiddleButtonDown() |
| 343 | { |
| 344 | int X = this->Interactor->GetEventPosition()[0]; |
| 345 | int Y = this->Interactor->GetEventPosition()[1]; |
| 346 | |
| 347 | // Okay, make sure that the pick is in the current renderer |
| 348 | if (!this->CurrentRenderer || !this->CurrentRenderer->IsInViewport(X, Y)) |
| 349 | { |
| 350 | this->State = vtkPointWidget::Outside; |
| 351 | return; |
| 352 | } |
| 353 | |
| 354 | // Okay, we can process this. |
| 355 | vtkAssemblyPath* path = this->GetAssemblyPath(X, Y, 0., this->CursorPicker); |
| 356 | |
| 357 | if (path != nullptr) |
| 358 | { |
| 359 | this->State = vtkPointWidget::Translating; |
| 360 | this->Highlight(1); |
| 361 | this->ConstraintAxis = this->DetermineConstraintAxis(-1, nullptr); |
| 362 | } |
| 363 | else |
| 364 | { |
| 365 | this->State = vtkPointWidget::Outside; |
| 366 | this->ConstraintAxis = -1; |
| 367 | return; |
| 368 | } |
| 369 | |
| 370 | this->EventCallbackCommand->SetAbortFlag(1); |
| 371 | this->StartInteraction(); |
| 372 | this->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr); |
| 373 | this->Interactor->Render(); |
| 374 | } |
| 375 | |
| 376 | void vtkPointWidget::OnMiddleButtonUp() |
| 377 | { |
no test coverage detected