[vtkusers] Callbacks from the render window interacor /interactorstyle

Klaus Nowikow klaus.nowikow at tuwien.ac.at
Tue Jun 10 04:17:39 EDT 2008


Vidyadhar wrote:
> Hi,
> If I look in documentation for vtkInteractorStyle I do not find this 
> method. But it is defined by vtkObject and inherited by 
> vtkInteractorStyle. I have used it on vtkInteractorStyleUser and 
> sometimes on other styles too. I think you only need to monitor the 
> interaction and not modify behavior of that interaction. In that case 
> you can add observer on whatever style is suitable for your purpose.

That's it! I didn't expect this method in vtkObject. Thank you, that
will help.

Best regards,
Klaus

> HTH
> Vidyadhar
> ----- Original Message ----- From: "Klaus Nowikow" 
> <klaus.nowikow at tuwien.ac.at>
> To: <vtkusers at public.kitware.com>
> Sent: Monday, June 09, 2008 3:37 PM
> Subject: Re: [vtkusers] Callbacks from the render window interacor 
> /interactorstyle
> 
> 
>> 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
>> >
>>
>>
>> _______________________________________________
>> 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