| 167 | } |
| 168 | |
| 169 | void mitk::AffineImageCropperInteractor::TranslateObject(StateMachineAction *, InteractionEvent *interactionEvent) |
| 170 | { |
| 171 | auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent); |
| 172 | if (positionEvent == nullptr) |
| 173 | return; |
| 174 | |
| 175 | Point3D currentPickedPoint = positionEvent->GetPositionInWorld(); |
| 176 | |
| 177 | Vector3D interactionMove; |
| 178 | interactionMove[0] = currentPickedPoint[0] - m_InitialPickedPoint[0]; |
| 179 | interactionMove[1] = currentPickedPoint[1] - m_InitialPickedPoint[1]; |
| 180 | interactionMove[2] = currentPickedPoint[2] - m_InitialPickedPoint[2]; |
| 181 | |
| 182 | mitk::Surface::Pointer surface = dynamic_cast<mitk::Surface *>(m_SelectedNode->GetData()); |
| 183 | mitk::BaseGeometry::Pointer surGeo = surface->GetGeometry(); |
| 184 | surGeo->SetOrigin(m_InitialOrigin); |
| 185 | surGeo->Translate(interactionMove); |
| 186 | |
| 187 | RenderingManager::GetInstance()->RequestUpdateAll(); |
| 188 | } |
| 189 | |
| 190 | void mitk::AffineImageCropperInteractor::DeformObject(StateMachineAction *, InteractionEvent *interactionEvent) |
| 191 | { |
nothing calls this directly
no test coverage detected