[vtkusers] vtkRenderWindowInteractor does not process key events

Mark Wyszomierski markww at gmail.com
Mon Apr 2 12:21:08 EDT 2007


Hmm I'm using the CVS version of VTK. It looks like the problem occurs
in the Rotate() function of vtkInteractorStyleTrackbacllCamera. At one
point the following call is made:

    vtkCamera *camera = CurrentRenderer->GetActiveCamera();

the memory address of camera changes when the mouse is inside the
bounds of the render window, and when it exits the bounds of the
render window. That's the only difference I can see. Other than that
the interactor is behaving fine (it seems to be updating other
components even when the mouse travels outside the render window
bounds).

Any ideas what is going on here?

Thanks,
Mark


On 3/29/07, Daniel Lüken <d.lueken at stud.fh-dortmund.de> wrote:
> Odd. It works quite fine for me. (vtk5, c++, win32 api gui)
>
> ----- Original Message -----
> From: "Mark Wyszomierski" <markww at gmail.com>
> To: "Daniel Lüken" <d.lueken at stud.fh-dortmund.de>
> Cc: "David Cole" <david.cole at kitware.com>; <vtkusers at vtk.org>
> Sent: Friday, March 30, 2007 3:44 AM
> Subject: Re: [vtkusers] vtkRenderWindowInteractor does not process key
> events
>
>
> Speaking of the interactor, do you also find that it is not using
> SetCapture()? It seems if I click in the renderer and start rotating
> the camera, then move the mouse outside the window boundaries, the
> interactor locks - until the mouse moves back within the window
> boundaries. I know a call to SetCapture() would fix this but shouldn't
> it be happening in the interactor already for windows platforms?
>
> Thanks,
> Mark
>
> On 3/29/07, Daniel Lüken <d.lueken at stud.fh-dortmund.de> wrote:
> > >> ...
> > >> switch(message)
> > >> {
> > >> ...
> > >> case WM_SETFOCUS:
> > >> SetFocus(theVTKApp->getWnd());
> >
> > >BE CAREFUL, now.... (If getWnd() returns 0 you will be setting focus
> > >to the Windows desktop...! Probably not going to happen, but probably
> > >not what you want if it does happen...)
> >
> > Oh - right. :)
> > Before I came across the vtk I never wrote win32 gui applications in c++.
> >
> > case WM_SETFOCUS:
> > {
> > HWND vtkwnd = theVTKApp->getWnd();
> > if(vtkwnd)
> > SetFocus(vtkwnd);
> > return 0;
> > }
> > break;
> > _______________________________________________
> > 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