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

Method InitTranslate

Modules/DataTypesExt/src/mitkClippingPlaneInteractor3D.cpp:105–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void mitk::ClippingPlaneInteractor3D::InitTranslate(StateMachineAction *, InteractionEvent *interactionEvent)
106{
107 auto *positionEvent = dynamic_cast<InteractionPositionEvent *>(interactionEvent);
108 if (positionEvent == nullptr)
109 return;
110
111 m_InitialPickedDisplayPoint = positionEvent->GetPointerPositionOnScreen();
112
113 vtkInteractorObserver::ComputeDisplayToWorld(interactionEvent->GetSender()->GetVtkRenderer(),
114 m_InitialPickedDisplayPoint[0],
115 m_InitialPickedDisplayPoint[1],
116 0.0, // m_InitialInteractionPickedPoint[2],
117 m_InitialPickedWorldPoint);
118
119 // Get the timestep to also support 3D+t
120 int timeStep = 0;
121 if ((interactionEvent->GetSender()) != nullptr)
122 timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData());
123
124 // Make deep copy of current Geometry3D of the plane
125 this->GetDataNode()->GetData()->UpdateOutputInformation(); // make sure that the Geometry is up-to-date
126 m_OriginalGeometry =
127 static_cast<Geometry3D *>(this->GetDataNode()->GetData()->GetGeometry(timeStep)->Clone().GetPointer());
128}
129
130void mitk::ClippingPlaneInteractor3D::InitRotate(StateMachineAction *, InteractionEvent *interactionEvent)
131{

Callers

nothing calls this directly

Calls 10

GetSenderMethod · 0.80
GetPointerMethod · 0.80
GetGeometryMethod · 0.80
GetVtkRendererMethod · 0.45
GetTimeStepMethod · 0.45
GetDataMethod · 0.45
GetDataNodeMethod · 0.45
CloneMethod · 0.45

Tested by

no test coverage detected