MCPcopy Create free account
hub / github.com/MITK/MITK / ApplyTranslationToManipulatedObject

Method ApplyTranslationToManipulatedObject

Modules/Gizmo/src/mitkGizmoInteractor.cpp:296–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void mitk::GizmoInteractor::ApplyTranslationToManipulatedObject(const Vector3D &translation)
297{
298 assert(m_ManipulatedObjectGeometry.IsNotNull());
299
300 auto manipulatedGeometry = m_InitialManipulatedObjectGeometry->Clone();
301 m_FinalDoOperation.reset(new PointOperation(OpMOVE, Point3D(translation)));
302 if (m_UndoEnabled)
303 {
304 m_FinalUndoOperation.reset(new PointOperation(OpMOVE, Point3D(-translation)));
305 }
306
307 manipulatedGeometry->ExecuteOperation(m_FinalDoOperation.get());
308 m_ManipulatedObjectGeometry->SetIndexToWorldTransform(manipulatedGeometry->GetIndexToWorldTransform());
309}
310
311void mitk::GizmoInteractor::ApplyEqualScalingToManipulatedObject(double scalingFactor)
312{

Callers

nothing calls this directly

Calls 6

IsNotNullMethod · 0.80
resetMethod · 0.80
CloneMethod · 0.45
ExecuteOperationMethod · 0.45

Tested by

no test coverage detected