[vtk-developers] proposed change to vtkGenericRenderWindowInteractor

John Biddiscombe john.biddiscombe at mirada-solutions.com
Fri Jul 23 07:31:43 EDT 2004


Yes. The interactors calling Render at inapproriate times often causes
me a lot of grief. I'd be happy to see this change. I can't remember
OTOMH where else I had trouble, but when destroying windows with widgets
in I often get trouble too. One removes all widgets from the renderer
(triggering another render) just when everything is supposed to be going
down.

$0.02

JB


> -----Original Message-----
> From: vtk-developers-bounces at vtk.org 
> [mailto:vtk-developers-bounces at vtk.org] On Behalf Of Charl P. Botha
> Sent: 23 July 2004 11:20
> To: VTK Developers
> Subject: [vtk-developers] proposed change to 
> vtkGenericRenderWindowInteractor
> 
> 
> Dear Developers,
> 
> In the light of the recent VTK/Python/wxPython discussions on 
> the users 
> mailing list, I wish to modify the vtkGenericRenderWindowInteractor 
> slightly.  I want to override the 
> vtkRenderWindowInteractor::Initialize 
> method in order to change it from:
> 
> void vtkRenderWindowInteractor::Initialize()
> {
>    this->Initialized=1;
>    this->Enable();
>    this->RenderWindow->Render();
> }
> 
> To:
> 
> void vtkGenericRenderWindowInteractor::Initialize()
> {
>    this->Initialized=1;
>    this->Enable();
> }
> 
> Rationale:
> The vtkGenericRenderWindowInteractor is there for VTK <-> 
> external event 
> handling interfacing.  In general, the API for 
> RenderWindowInteractors 
> requires that RWI->Initialize() and RWI->Start() are called.  
> However, 
> when the RWI is cooperating with a widget set, we don't want the 
> Initialize() (which is often called before the widget set's event 
> handling loop can begin) to force a Render(), as this can 
> interfere with 
> the window refresh logic of the widget set.
> 
> I would like to hear any comments on this proposed change.
> 
> Thanks,
> Charl
> 
> -- 
> charl p. botha http://cpbotha.net/ 
> http://visualisation.tudelft.nl/ 
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org 
> http://www.vtk.org/mailman/listinfo/v> tk-developers
> 



More information about the vtk-developers mailing list