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

Method PickOriginAction

Interaction/Widgets/vtkCoordinateFrameWidget.cxx:184–201  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

182
183//------------------------------------------------------------------------------
184void vtkCoordinateFrameWidget::PickOriginAction(vtkAbstractWidget* w)
185{
186 vtkCoordinateFrameWidget* self = reinterpret_cast<vtkCoordinateFrameWidget*>(w);
187
188 int X = self->Interactor->GetEventPosition()[0];
189 int Y = self->Interactor->GetEventPosition()[1];
190
191 self->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr);
192 bool newOriginPicked = self->GetCoordinateFrameRepresentation()->PickOrigin(
193 X, Y, self->Interactor->GetControlKey() == 1);
194 self->InvokeEvent(vtkCommand::InteractionEvent, nullptr);
195 self->EventCallbackCommand->SetAbortFlag(1);
196 self->InvokeEvent(vtkCommand::EndInteractionEvent, nullptr);
197 if (newOriginPicked)
198 {
199 self->Render();
200 }
201}
202
203//------------------------------------------------------------------------------
204void vtkCoordinateFrameWidget::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