| 461 | } |
| 462 | |
| 463 | void mitk::DisplayActionEventBroadcast::Move(StateMachineAction* /*stateMachineAction*/, InteractionEvent* interactionEvent) |
| 464 | { |
| 465 | const auto* positionEvent = dynamic_cast<InteractionPositionEvent*>(interactionEvent); |
| 466 | if (nullptr == positionEvent) |
| 467 | { |
| 468 | return; |
| 469 | } |
| 470 | |
| 471 | BaseRenderer* sender = interactionEvent->GetSender(); |
| 472 | Vector2D moveVector = m_LastDisplayCoordinate - positionEvent->GetPointerPositionOnScreen(); |
| 473 | |
| 474 | if (m_InvertMoveDirection) |
| 475 | { |
| 476 | moveVector *= -1.0; |
| 477 | } |
| 478 | |
| 479 | moveVector *= sender->GetScaleFactorMMPerDisplayUnit(); // #TODO: put here? |
| 480 | |
| 481 | // store new display coordinate |
| 482 | m_LastDisplayCoordinate = positionEvent->GetPointerPositionOnScreen(); |
| 483 | |
| 484 | // propagate move event with computed geometry values |
| 485 | InvokeEvent(DisplayMoveEvent(interactionEvent, moveVector)); |
| 486 | } |
| 487 | |
| 488 | void mitk::DisplayActionEventBroadcast::SetCrosshair(StateMachineAction* /*stateMachineAction*/, InteractionEvent* interactionEvent) |
| 489 | { |
nothing calls this directly
no test coverage detected