------------------------------------------------------------------------------
| 253 | |
| 254 | //------------------------------------------------------------------------------ |
| 255 | void vtkImplicitPlaneWidget2::ScaleAction(vtkAbstractWidget* w) |
| 256 | { |
| 257 | vtkImplicitPlaneWidget2* self = reinterpret_cast<vtkImplicitPlaneWidget2*>(w); |
| 258 | |
| 259 | // Get the event position |
| 260 | int X = self->Interactor->GetEventPosition()[0]; |
| 261 | int Y = self->Interactor->GetEventPosition()[1]; |
| 262 | |
| 263 | // We want to compute an orthogonal vector to the pane that has been selected |
| 264 | reinterpret_cast<vtkImplicitPlaneRepresentation*>(self->WidgetRep) |
| 265 | ->SetInteractionState(vtkImplicitPlaneRepresentation::Scaling); |
| 266 | int interactionState = self->WidgetRep->ComputeInteractionState(X, Y); |
| 267 | self->UpdateCursorShape(interactionState); |
| 268 | |
| 269 | if (self->WidgetRep->GetInteractionState() == vtkImplicitPlaneRepresentation::Outside) |
| 270 | { |
| 271 | return; |
| 272 | } |
| 273 | |
| 274 | // We are definitely selected |
| 275 | self->GrabFocus(self->EventCallbackCommand); |
| 276 | double eventPos[2]; |
| 277 | eventPos[0] = static_cast<double>(X); |
| 278 | eventPos[1] = static_cast<double>(Y); |
| 279 | self->WidgetState = vtkImplicitPlaneWidget2::Active; |
| 280 | self->WidgetRep->StartWidgetInteraction(eventPos); |
| 281 | |
| 282 | self->EventCallbackCommand->SetAbortFlag(1); |
| 283 | self->StartInteraction(); |
| 284 | self->InvokeEvent(vtkCommand::StartInteractionEvent, nullptr); |
| 285 | self->Render(); |
| 286 | } |
| 287 | |
| 288 | //------------------------------------------------------------------------------ |
| 289 | void vtkImplicitPlaneWidget2::MoveAction(vtkAbstractWidget* w) |
nothing calls this directly
no test coverage detected