[vtkusers] Usage question SetInteractor() vs SetRenderWindow()

Jim Peterson jimcp at cox.net
Sat Sep 11 22:58:14 EDT 2010


All,
I had used vtk in  the late 90's and had some programs based on the 
samples at that time, I have revised them to work with vtk 5.6.0 with 
minor changes generally in the area of callbacks. One curiosity I 
discovered recently is in the area of the setup of the window 
interaction settings. all my previous logic has used the SetInteractor() 
method of the vtkRenderWindow to associate the vtkRenderWindowInteractor 
with the render window. While exploring some of the newer examples of 
the vtkWidget classes I encountered some logic that uses the 
SetRenderWindow() method of the vtkRenderWindowInteractor to make the 
same association. reviewing the logic for both methods, they appear to 
be mirror images of each other, and neither is indicated as preferred in 
the class documentation. I  believe each render window can refer to only 
one interactor and each interactor can have only one render window.

Does anyone have a reason to prefer one over the other? One thing is 
clear, with the version 5.6.0 the orientation widget cannot be 
associated with the render window interactor until after the render 
window interactor is associated with the render window.

thanks,
Jim





More information about the vtkusers mailing list