[vtkusers] vtk picking

de Boer Ingo I.deBoer at polytec.de
Tue Mar 15 03:19:19 EST 2005


Hi Tracy,

you get "-1" because you didn't start the picker callback.
with StartPickCallback. Look at the lines of vtkInteractorStyle.cxx:
Search for "'p'". This is what happens, when you press "p". Your
version works with LeftButtonPressEvent when you press "p" before
you press the left mouse button.

The easiest way for you would be to write your own interactor.

greets
  Ingo

---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255
 

> It is my first time to use vtkCellPicker and the related classes. 
> Unfortunately, I
> never get any code works well for me regardless of writing by myself
> or downloading from Internet. One example is from
> http://public.kitware.com/pipermail/vtkusers/2004-April/073344.html,
> but it looks that "vtkCommand::EndPickEvent" doesn't show any effect,
> if I use "LeftButtonPressEvent" instead of "EndPickEvent" , 
> the printed
> value is always "-1" ,which means I never picked any point.
> Anybody can tell me why?



More information about the vtkusers mailing list