[vtkusers] vtkcellpicker
Mary Lederer
surreal at bwh.harvard.edu
Fri Nov 1 14:35:10 EST 2002
Hi there.
I'm having some problems with vtkCellPicker. Basically, I have a
scene with one or more actors (3D) in it, and I would like to make it
so that if the user hovers the mouse pointer over one of the actors
and presses a key, a sphere actor appears at the point where mouse
pointer was and on the near surface of the actor. To this end, I am
using vtkCellPicker, to pick a cell, then using the cell's bounds and
setting the position of the sphere actor at the approximate center of
the selected cell. Not perfect, but good enough for my purposes. (I
am mostly doing it this way because I am using somebody else's code,
and it would be rather inconvenient to try to do it another way.)
My problem: For some reason, the vtkCellPicker seems to like to pick
the cell with cellId 0 a lot. It doesn't do it all the time, but
there are particular areas (not necessarily close to the cell in
question) of the actor that i've been trying to test that if I try to
pick them, the picker picks the cell with cellId 0.
Why does it do this? Any suggestions? (I'm on digest mode, so if you
could CC: responses to this email address, I'd appreciate it.)
Thanks,
-Maitland
More information about the vtkusers
mailing list