[vtkusers] newbie question: vtkPicker
Bruno da Silva de Oliveira
bruno at esss.com.br
Wed Dec 7 05:36:30 EST 2005
Hi,
It depends on how you are rendering your data. Each particle is a
separate actor? If so, use a vtkPropPicker instance. If you're rendering
a single polydata, and each particle is a cell, you will have to use
vtkCellPicker.
With both classes, you would call the method Pick giving the (x, y)
coordinates of the mouse position (remember to flip the Y axis if
necessary), and use on the methods of the class to get the picked
actor/cell (GetActor() in vtkPropPicker and GetCellId() in vtkCellPicker).
HTH,
Iwona i Janusz Goldasz wrote:
> Dear all: I am seeking an answer regarding the vtkPicker class. I
> am pretty much a newcomer to the world of VTK.
> In my java app, I use vtk for visualizing particle systems motion
> (discrete element method simulations). One particular feature
> I would like to have is to be able to pick/select a specific particle
> with a mouse and query its present behavior/properties at a given
> simulation step.
>
> All 3D graphics is build/rendered into a vtkPanel panel object.
>
> From what I have learned vtkPicker would probably suit my needs - I am
> looking for any examples of the picker's application
> regardless programming language used (c++, python, java, ???). Unless
> somebody could point into a different direction if there is one.
>
> I am rewriting my code from java3D into java and vtk I had this
> feature implemented with my j3d application and it was quite useful.
>
> Regards & appreciate any suggestions,
> Janusz Goldasz
> ----------------------------------------------------------------------
> Kobieto, dziewczyno, matko, zono, kochanko... KLIKNIJ PO WIECEJ!
> >>> http://link.interia.pl/f18e5
>
>------------------------------------------------------------------------
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
Bruno da Silva de Oliveira
bruno at esss.com.br
ESSS - Engineering Simulation and Scientific Software
http://www.esss.com.br
More information about the vtkusers
mailing list