MCPcopy Create free account
hub / github.com/Kitware/VTK / PickOriginAction

Method PickOriginAction

Interaction/Widgets/vtkDisplaySizedImplicitPlaneWidget.cxx:206–225  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

204
205//------------------------------------------------------------------------------
206void vtkDisplaySizedImplicitPlaneWidget::PickOriginAction(vtkAbstractWidget* w)
207{
208 vtkDisplaySizedImplicitPlaneWidget* self =
209 reinterpret_cast<vtkDisplaySizedImplicitPlaneWidget*>(w);
210
211 int X = self->Interactor->GetEventPosition()[0];
212 int Y = self->Interactor->GetEventPosition()[1];
213
214 // Invoke all the events associated with moving the plane
215 self->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr);
216 bool newOriginPicked = self->GetDisplaySizedImplicitPlaneRepresentation()->PickOrigin(
217 X, Y, self->Interactor->GetControlKey() == 1);
218 self->InvokeEvent(vtkCommand::InteractionEvent, nullptr);
219 self->EventCallbackCommand->SetAbortFlag(1);
220 self->InvokeEvent(vtkCommand::EndInteractionEvent, nullptr);
221 if (newOriginPicked)
222 {
223 self->Render();
224 }
225}
226
227//------------------------------------------------------------------------------
228void vtkDisplaySizedImplicitPlaneWidget::PickNormalAction(vtkAbstractWidget* w)

Callers

nothing calls this directly

Calls 3

InvokeEventMethod · 0.80
RenderMethod · 0.65
PickOriginMethod · 0.45

Tested by

no test coverage detected