[vtk-developers] Change to Widgets
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Mon Sep 24 11:53:53 EDT 2007
The reason for this change is Paraview. In ParaView when interacting the
client switches into a low-detail rendering mode and switched out of it
when EndInteractionEvent is fired by the interactor style or the widget.
If the widget fires the event before render than paraview switches out
of the interactive mode (to full res mode) and renders in full res.
However for certain widgets another render ensues which causes two full
res renders at the end of interaction.
However, I am going to take a deeper look into the issue on the ParaView
side. Your use-case seems fairly reasonable and it seems unfair to force
such a change on VTK unless really justified.
Utkarsh
Tim Peeters wrote:
> 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
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
More information about the vtk-developers
mailing list