[vtkusers] vtkInteractorStyle question

alext at win.tue.nl alext at win.tue.nl
Tue Jun 20 07:46:11 EDT 2000


   Hi all,

  I have a question about the features offered by vtk interactors:

  I use the classical combination between a vtkRenderWindow and a
  vtkRenderWindowInteractor + vtkInteractorStyle. I need, however,
  to trap the cases when the user interactively manipulates the
  rendered scene, in order to signal some other code in my system
  that will read the newly rendered frame from the viewer and
  cache it, etc.

  However, it seems I'm short of callbacks/subclassing mechanisms
  to do this (maybe I'm wrong and maybe someone knows how to solve this).

  - if I subclass vtkInteractorStyleTrackball to trap the mouse
       buttons + move events, I get the undesired effect that the 
       OnMouseMove() method is called repeatedly even if I don't
       move the mouse - which is not what I need, as, in trackball mode,
       the image does not change when the mouse does not move.
       Moreover, the opposite happens in the joystick mode - and other
       policies might be coded in the future, so I don't want to
       subclass vtkInteractorStyleTrackball. 

  - if I want to trap the scene rendering 'action' differently, it seems
    I have to subclass vtkRenderWindow. This causes the same problem,
    since it has a lot of derived classes which I don't want to subclass
    each to override e.g. the CopyResultFrame() method.
    
  Is there a way to trap the render events differently than subclassing
  vtkRenderWindow ? Maybe this points to a more general question:
  how can is attach other 'pipeline' objects _after_ a vtkRenderWindow,
  such that these objects are notified when there's a new frame ?

  Alex Telea

------------------------------------------------------------------
  Alexandru C. Telea   	      | Technische Universiteit Eindhoven
			      |	
  E-mail   : alext at win.tue.nl | Dept. of Mathematics and 
  			      | Computing Science
  Office   :  HG 8.30         | Postbus 513
  Tel.     : +31 40 247 4328  | 5600 MB Eindhoven
  Secretary: +31 40 247 4416  | The Netherlands			      
  Fax	   : +31 40 244 2489  |
  URL      : http://www.win.tue.nl/math/an/alext
-------------------------------------------------------------------




More information about the vtkusers mailing list