[vtkusers] Callbacks from the render window interacor / interactorstyle

Klaus Nowikow klaus.nowikow at tuwien.ac.at
Mon Jun 9 06:07:08 EDT 2008


Vidyadhar wrote:
 > Hi,
 > I do not know exactly how to do this in Python

No problem, I just mentioned it because sometimes things are a bit
easier in Python than in C++.

 > but vtkInteractorStyle
 > has two events - InteractionEvent and EndInteractionEvent.

Ah, yes, just found them in the docs. Thanks.

 > InteractionEvent can be used to contiously update camera position (but
 > it can slow down things). If you can add observer for one/both these
 > events and then get query camera's position then you can update the
 > edit box.

That would be the right way to do it. I just can't find an "AddObserver"
method (or something like that) anywhere -- or maybe I am looking at the
wrong places.
I think I could also use vtkInteractorStyleUser instead, but then I 
would virtually implement vtkInteractorStyleTerrain with some additional
code to update the edit boxes. I will do that if there's no other
solution, but I'd rather re-use existing classes.

 > HTH
 > Vidyadhar
 > ----- Original Message ----- From: "Klaus Nowikow"
 > <klaus.nowikow at tuwien.ac.at>
 > To: <vtkusers at public.kitware.com>
 > Sent: Monday, June 09, 2008 1:14 PM
 > Subject: [vtkusers] Callbacks from the render window interacor /
 > interactorstyle
 >
 >
 >> Hi,
 >>
 >> is it possible to get a notification from a vtkRenderWindowInteractor
 >> (using vtkInteractorStyleTerrain in my case) when the user changes the
 >> camera position? I'd like to present the camera position to the user
 >> in an edit box.
 >> I am using VTK with Python.
 >>
 >> Regards,
 >> Klaus
 >>
 >> _______________________________________________
 >> This is the private VTK discussion list.
 >> Please keep messages on-topic. Check the FAQ at:
 >> http://www.vtk.org/Wiki/VTK_FAQ
 >> Follow this link to subscribe/unsubscribe:
 >> http://www.vtk.org/mailman/listinfo/vtkusers
 >
 > _______________________________________________
 > This is the private VTK discussion list.
 > Please keep messages on-topic. Check the FAQ at:
 > http://www.vtk.org/Wiki/VTK_FAQ
 > Follow this link to subscribe/unsubscribe:
 > http://www.vtk.org/mailman/listinfo/vtkusers
 >





More information about the vtkusers mailing list