[vtkusers] Picking points from (multiple) vtkStructuredGrids using vtkPointPicker

da xu remywendy at gmail.com
Thu Aug 27 20:16:51 EDT 2009


Hey Gregory,

I don't have the code with me right now, but the basic implementation was
using the vtkPointPicker class.

It went something like this:

 vtkPointPicker *picker = vtkPointPicker::New();
 picker->Pick(x, y, 0, this->m_flowInternal->renderer);

 id = picker->GetPointId();
 *actor = picker->GetActor();


id was the index of the point, and actor was the actor associated with the
structured grid that the point came from. I forgot how I got the x,y
co-ordinates of a mouse click; I believe I subclassed something?

On Thu, Aug 27, 2009 at 10:35 AM, Grzegorz Pytel <bioinfguy at gmail.com>wrote:

> Hi,
> I've read your post on 3 Aug 2009 and would like to ask you for sending me
> your picking code you have done.  How do you get an id of picked cell using
> vtkPicker? how it is possible to get the index of the point picked of some
> vtkStructuredGrid?? How do you get a cell?
> Thanks in advance,
> Regards,
> Gregory
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090827/f5d2c88a/attachment.htm>


More information about the vtkusers mailing list