[vtk-developers] Change to Widgets
Tim Peeters
T.Peeters at tue.nl
Mon Sep 24 10:44:26 EDT 2007
Hi Utkarsh,
Why are you doing this after the render call? To me it seems that the
event means that the interaction ended and not that the rendering ended.
I have some code where I wait for an EndInteraction event of
vtkImageTracerWidget and other widgets to update a seeding region and
automatically generate new seed points for streamline tracing, trace the
streamlines, and re-render the scene (all depending on some flags which
can be set by the user). I didn't try it, but I guess your change can
result in 2 render passes where only one is needed. The first one before
you call InvokeEvent, and the second after you invoke the event and my
code updates the scene.
Tim.
Utkarsh Ayachit wrote:
> Hi Folks,
>
> I am in the process of changing all the widgets so that they fire the
> vtkCommand::EndInteractionEvent after the render call.
>
> To elaborate, almost all widgets do something similar to the following
> code on end interaction (typically mouse up):
>
> ....(change internal state to note that interaction has ended)
> this->InvokeEvent(vtkCommand::EndInteraction);
> this->Render();
>
>
> I am changing this to:
>
> ....(change internal state to note that interaction has ended)
> this->Render();
> this->InvokeEvent(vtkCommand::EndInteraction);
>
> Does anyone see any issues with this?
>
> Thanks,
> Utkarsh
More information about the vtk-developers
mailing list