| 396 | } |
| 397 | |
| 398 | void mitk::AffineBaseDataInteractor3D::TranslateObject(StateMachineAction *, InteractionEvent *interactionEvent) |
| 399 | { |
| 400 | auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent); |
| 401 | if (positionEvent == nullptr) |
| 402 | return; |
| 403 | |
| 404 | Point3D currentPickedPoint = positionEvent->GetPositionInWorld(); |
| 405 | |
| 406 | Vector3D interactionMove; |
| 407 | interactionMove[0] = currentPickedPoint[0] - m_InitialPickedWorldPoint[0]; |
| 408 | interactionMove[1] = currentPickedPoint[1] - m_InitialPickedWorldPoint[1]; |
| 409 | interactionMove[2] = currentPickedPoint[2] - m_InitialPickedWorldPoint[2]; |
| 410 | |
| 411 | int timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData()); |
| 412 | |
| 413 | mitk::BaseGeometry::Pointer geometry = |
| 414 | this->GetDataNode()->GetData()->GetUpdatedTimeGeometry()->GetGeometryForTimeStep(timeStep); |
| 415 | geometry->SetOrigin(m_OriginalGeometry->GetOrigin()); |
| 416 | |
| 417 | this->TranslateGeometry(interactionMove, this->GetUpdatedTimeGeometry(interactionEvent)); |
| 418 | |
| 419 | return; |
| 420 | } |
| 421 | |
| 422 | void mitk::AffineBaseDataInteractor3D::RotateObject(StateMachineAction *, InteractionEvent *interactionEvent) |
| 423 | { |
nothing calls this directly
no test coverage detected