[vtkusers] vtk picking

Tracy flypureau at hotmail.com
Tue Mar 15 00:54:27 EST 2005


Hello Everyone,

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?

Actually what I want to do is to pick a specific cell, retrieve the position
of picked cell and change the colour and property based on the user
requirements.I think it shouldn't be difficult, but don't know why I get so
much trouble.

Anyone can give me a rough C++ programming structure to implement this
function?
Your help is greatly appreciated!


Regards
Tracy



More information about the vtkusers mailing list