<div dir="ltr">2008/7/28 Sercani <span dir="ltr"><<a href="mailto:sercanimailgroups@gmail.com">sercanimailgroups@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hi Julian;</span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">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…</span></p></div></div></blockquote><div> If you are under linux. Go through the root path of VTK and make :<br><br>patch -p0 < file.patch<br><br>On windows i don't know, it is to you to find an equivalent of linux patch program.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US"><div><p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> 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?</span></p></div></div></blockquote><div>I don't know. make tests but I think it's the same speed (but if the algorithm of vtkPropPicker is not the same, it can be faster than vtkVisibleCellSelection).<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US"><div><p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> And
how can I use it with backface culling?</span></p></div></div></blockquote><div>Normally the backface culling is take in care on the pick selection and if not it's a bug. What do you mean exactly ? <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div><p><span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>
<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> Julian Ibarz
[mailto:<a href="mailto:julian.ibarz@gmail.com" target="_blank">julian.ibarz@gmail.com</a>] <br>
<b>Sent:</b> Thursday, July 24, 2008 12:20 PM<br>
<b>To:</b> Sercani<br>
<b>Subject:</b> Re: [vtkusers] vtkPropPicker tolerance?</span></p>
</div><div><div></div><div class="Wj3C7c">
<p> </p>
<div>
<p style="margin-bottom: 12pt;">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.<br>
<br>
Personally I made two patches that increase the speed in some cases from 4 to
10 times. You can find them at :<br>
<a href="http://www.vtk.org/Bug/view.php?id=7111" target="_blank">http://www.vtk.org/Bug/view.php?id=7111</a><br>
<a href="http://www.vtk.org/Bug/view.php?id=7296" target="_blank">http://www.vtk.org/Bug/view.php?id=7296</a><br>
<br>
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.<br>
<br>
And example of use of this patches can be found here :<br>
<br>
The main idea is :<br>
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.<br>
<br>
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...<br>
<br>
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 (<a href="http://jcae.sourceforge.net" target="_blank">http://jcae.sourceforge.net</a>) :<br>
see file vtk-util/src/org/jcae/vtk/Scene.java on method Scene.pick.</p>
<div>
<p>2008/7/24 Sercani <<a href="mailto:sercanimailgroups@gmail.com" target="_blank">sercanimailgroups@gmail.com</a>></p>
<div>
<div>
<p>Hi everyone,</p>
<p>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? </p>
<p>Thanks already…</p>
<p> </p>
<p> </p>
</div>
</div>
<p style="margin-bottom: 12pt;"><br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a></p>
</div>
<p><br>
<br clear="all">
<br>
-- <br>
Julian Ibarz</p>
</div>
</div></div></div>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Julian Ibarz<br>
</div>