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

Method ApplyRotationToManipulatedObject

Modules/Gizmo/src/mitkGizmoInteractor.cpp:326–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326void mitk::GizmoInteractor::ApplyRotationToManipulatedObject(double angle_deg)
327{
328 assert(m_ManipulatedObjectGeometry.IsNotNull());
329
330 auto manipulatedGeometry = m_InitialManipulatedObjectGeometry->Clone();
331
332 m_FinalDoOperation.reset(new RotationOperation(OpROTATE, m_InitialGizmoCenter3D, m_AxisOfRotation, angle_deg));
333 if (m_UndoEnabled)
334 {
335 m_FinalUndoOperation.reset(new RotationOperation(OpROTATE, m_InitialGizmoCenter3D, m_AxisOfRotation, -angle_deg));
336 }
337
338 manipulatedGeometry->ExecuteOperation(m_FinalDoOperation.get());
339 m_ManipulatedObjectGeometry->SetIndexToWorldTransform(manipulatedGeometry->GetIndexToWorldTransform());
340}
341
342void mitk::GizmoInteractor::FeedUndoStack(StateMachineAction *, InteractionEvent *)
343{

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