[vtkusers] vtkPropPicker tolerance?

Sercani sercanimailgroups at gmail.com
Mon Jul 28 03:14:05 EDT 2008


Hi Julian;

Thanks for your reply, I've looked at vtkVisibleCellSelection class and your
bug patches, it is really what I need but I don't know how to use these
patches. And there are a couple of questions in my mind. I am using
wxWidgets mouse events instead of vtkRenderWindowInteractor for mouse
interaction, and i must use these selections in mouse motion event too(for
cursor change), can vtkVisibleCellSelection be fast as vtkPropPicker? And
how can I use it with backface culling?

 

From: Julian Ibarz [mailto:julian.ibarz at gmail.com] 
Sent: Thursday, July 24, 2008 12:20 PM
To: Sercani
Subject: Re: [vtkusers] vtkPropPicker tolerance?

 

vtkPropPicker make picking using bounding box of your line so it's not what
you need. You need a real picking and you can do that using
vtkVisibleCellSelection but it is very slow.

Personally I made two patches that increase the speed in some cases from 4
to 10 times. You can find them at :
http://www.vtk.org/Bug/view.php?id=7111
http://www.vtk.org/Bug/view.php?id=7296

This patches worked with 5-2 branch version of VTK. Not sure it works with
nightly version but if not contact me i will update them.

And example of use of this patches can be found here :

The main idea is :
Not recompile the scene after a picking (it permit to gain more that twice a
time the picking). This is the first patch. Also draw only the objects
pickable but visible (not removing the z-buffer, this is the second patch).
This permits if you have a moment in your application that you can only
select lines to render only them and gain more time.

This patches was maded to improve selection of CAO models. In my program i
can select faces, or edges or vertice but only one type at a time. So Imake
pickable only faces, or edges or vertice. With none of this two patches for
really big models (with 3 frame per seconds on rendering on my computer),
the picking was about 5 or 6 seconds. Actually the picking is about 500 ms
for faces and under 200 ms for edges...

To make tolerance with vtkVisibleCellSelector make a window selection of 5x5
pixels for example. It will select your line if the line is on this window.
You have my picking algorithm on the subversion of jCAE
(http://jcae.sourceforge.net) :
see file vtk-util/src/org/jcae/vtk/Scene.java on method Scene.pick.

2008/7/24 Sercani <sercanimailgroups at gmail.com>

Hi everyone,

I need vtkPropPicker for picking an actor which created from vtkLineSource.
Other pickers are too slow and do not satisfy user requirements.
vtkPropPicker is extremely fast but its tolerance is not enough,  picking
the lines in a scene requires really good mouse skill and patience :D. I
couldn't find a setTolerance function as such in vtkPicker. Is there another
way to adjust picking tolerance in vtkPropPicker? 

Thanks already.

 

 


_______________________________________________
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




-- 
Julian Ibarz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080728/aaefad56/attachment.htm>


More information about the vtkusers mailing list