[vtkusers] wxVTKWindow: controlling events.

David Gobbi dgobbi at irus.rri.ca
Wed Jan 23 13:12:39 EST 2002


Hi Stefano,

Neither VTK/Wrapping/Python/wxVTKRenderWindow.py (the one I wrote) or
wxPython/lib/vtk.py (the one Robin/Prabhu/Sebastien wrote) has any
binding for the "3" key.

Did you connect a vtkRenderWindowInteractor to your vtkRenderWindow?
If so, then that is what is causing your problems.

As for 3D stereo rendering, every video card and every driver acts
slightly different.  A good driver can render a 3D stereo window and
2D windows at the same time without problems.  With other drivers it
is necessary to convert all windows/renderers to 3D stereo but just
set the EyeAngle to zero in the ones that you want to be 2D.  Some
drivers can only handle a single 3D stereo context.  Some drivers
require the machine to be rebooted every time you switch from stereo
to non-stereo.  And then sometimes the batteries in those stupid
3D goggles go dead, and your client has been politely "ooing" and "aahing"
even though he's seeing double instead of seeing stereo.  Stereo is the
bane of my existence...

 - David

--
  David Gobbi, MSc                       dgobbi at irus.rri.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Wed, 23 Jan 2002, stefano mininel wrote:

> Stereo rendering with 2+ renderers in one window doesn't work correctly.
> A solution is to remove temporarily all renderers except the one to be
> put in 3D, and adding them again to the window when switching back into
> 2D. In my wxWindows/vtk application  my 2D/3D switch customized this way
> works correctly.
>
> The problem is: when "3" key is pressed this event calls the "regular"
> vtk 2D/3D switch and vtkWindow goes into a buggy stereo rendering.
>
> I tried to prevent further event processing by adding
> " if (event.GetKeyCode == 33) return; " in
> wxVTKWindow::OnKeyDown,
> wxVTKWindow::OnKeyUp,
> wxVTKWindow::OnChar
> (trying all possible combinations!) but it seems I can't prevent vtk
> from receiving the "3 key" event.
> Any idea from one of the wxWindows/vtk users?
> Thanks in advance for any help.
>
>     Stefano Mininel
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list