[vtkusers] Problem on Pick operation

cokio cokio at sjtu.edu.cn
Thu Jan 15 08:54:14 EST 2004


Hi, everyone:
       I want my program to pick an actor and I hope that it is the "code" to do that .
       Usually we pick something with the mouse to select a pick point and press "p"
       to realize it, we can see the bounding box around the prop or actor.
       This time, I want the code to do it. And I use the method vtkPicker::Pick(float selectionPt[3],
  vtkRenderer* ren) to realize it. But it seems I failed. Nothing was picked.I am sure the
  selected point is valid because I use actor->GetCenter() to get the point I need to pick 
  this actor.
       I also see a method like actor->Pick(), but unfortunately it still failed to pick the 
  actor I need. So I want to know what's wrong with my code and how can vtk support the Pick
  event without any participation of the mouse and keyboard(the "p" key) .
       Thanks.
	

        
 				

        cokio
        cokio at sjtu.edu.cn
          2004-01-15





More information about the vtkusers mailing list