[vtkusers] combine custom and regular VTK interaction in the widgets derived from vtkAbstractWidget
kshivann at engineering.uiowa.edu
kshivann at engineering.uiowa.edu
Wed Apr 2 11:50:06 EDT 2008
hi all,
i am trying to combine custom interation with the regular vtk
interactions. for e.g., if i set a call back method for left button
press event,
this->CallbackMapper->SetCallbackMethod(
vtkCommand::LeftButtonPressEvent,
vtkEvent::NoModifier, 0, 1, NULL,
vtkMimxUnstructuredGridWidget::LeftMouseButtonDown,
this, vtkMimxUnstructuredGridWidget::LeftButtonDownCallback)
only the custom interaction takes place. the code for function
LeftButtonDownCallback is as follows,
void
vtkMimxUnstructuredGridWidget::LeftButtonDownCallback(vtkAbstractWidget
*w)
{
vtkMimxUnstructuredGridWidget *self =
reinterpret_cast<vtkMimxUnstructuredGridWidget*>(w);
{CUSTOM INTERACTION}
self->EventCallbackCommand->SetAbortFlag(1);
self->StartInteraction();
self->InvokeEvent(vtkCommand::StartInteractionEvent,NULL);
self->Interactor->Render();
}
custom interaction is activated only if for e.g., a face or a point is
picked else the regular vtk interactions should take precedence in the
same function. Any help is greatly appreciated.
thanks
kiran
More information about the vtkusers
mailing list