[vtkusers] vtkCocoaRenderWindowInteractor

Drew McCormack cormack at chem.vu.nl
Mon Sep 23 03:30:43 EDT 2002


How exactly does the behavior differ, Patrick?

I found what I think is a bug in the cocoa implementation. When I run 
the Mace example, for example, the clicks I make seem to be interpreted 
as though the window were positioned at the bottom-left corner of the 
screen. I was able to fix this by replacing a few lines of code in the 
vtkCocoaGLView source. If you look for any lines of this form:

     mouseLoc = [self convertPoint:[theEvent locationInWindow] 
fromView:nil];

and replace them with this:

     mouseLoc = [self convertPoint:[[self window] 
convertScreenToBase:[theEvent locationInWindow]] fromView:nil];

the interaction will be relative to the center of the window, wherever 
it is located.

I don't understand how this fix works, to be honest. I suspect that it 
just compensates for a problem elsewhere in the code, perhaps in the 
interactor class.

If this is a bug, someone should commit it to the repository; I'm 
afraid I don't have committing rights.

Drew McCormack

On Sunday, September 22, 2002, at 09:49  pm, Patrick Klein wrote:

> Because of the great improvement in speed, I'd
> like to use Cocoa windows instead of X windows;
> however, the vtkCocoaRenderWindowInteractor
> doesn't behave very much like the
> vtkXRenderWindowInteractor in terms how
> it accepts clicks, keyboard input, etc.
> Are there plans to update this?
>
> Thanks,
>
> --Patrick
>
> ------------------------------------------
> Patrick A. Klein
> Sandia National Laboratories
> MS9161
> P.O. Box 0969
> Livermore, CA 94551
>
> p: (925) 294-4618 or (800) 4SANDIA x4-4618
> f: (925) 294-3231
> e: paklein at sandia.gov
> ------------------------------------------
>
>
> _______________________________________________
> 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
>
>
========================================
  Dr. Drew McCormack (Kmr. R153)
  Afd. Theoretische Chemie
  Faculteit Exacte Wetenschappen
  Vrije Universiteit Amsterdam
  De Boelelaan 1083
  1081 HV Amsterdam
  The Netherlands

  Email		cormack at chem.vu.nl
  Telephone  	+31 20 44 47623
  Mobile		+31 6 483 21307
  Fax   		+31 20 44 47629




More information about the vtkusers mailing list