[vtk-developers] Line picking

David Gobbi david.gobbi at gmail.com
Sun Jan 24 11:28:41 EST 2010


Hi Will, Pat,

I've just checked in the new vtkCellPicker as of this morning.  It
should show up in the nightly doxygen pages tomorrow.  For picking
lines with vtkCellPicker the trick is setting the tolerance correctly.

What Will says about the data being inconsistent between render & pick
is something that can also occur with vtkPicker and its subclasses in
some circumstances.  The vtkPicker expects that all the data was
updated in the previous rendering pass, so it doesn't call Update on
the data right before the pick.  If the data has changed between the
last render and the pick, then it is necessary to either (a) re-render
just before the pick or (b) go through all the props whose data might
have changed and update their mappers' inputs.

   David


On Sun, Jan 24, 2010 at 5:27 AM, Will Schroeder
<will.schroeder at kitware.com> wrote:
> Pat-
>
> For now use vtkCellPicker (I'll attached the modified C++ file) it works
> much better. I believe what's going on is the rendering pass made during the
> picking process is not consistent with the display rendering pass, hence the
> picking is working badly. I'm going to have to dive deeper into this which
> my brain is resisting this being early Sunday morning (and I am in Bar
> Harbor watching the sunrise :-))
>
> Note that David Gobbi is reworking vtkCellPicker and if he hasn't checked it
> in yet, will do so shortly. By using a locator with the new vtkCellPicker
> you will get great performance. plus more information than vtkPropPicker can
> give you.
>
> Let me know if you need more help and I'll give you a call, in the mean time
> I'll back burner the vtkPropPicker for lines.
>
> Will
>
> On Sat, Jan 23, 2010 at 1:22 PM, pat marion <pat.marion at kitware.com> wrote:
>>
>> I hacked one of the vtk examples to demonstrate the bug.  Attached and
>> copied below.  With the bug, it will only print "Pick success" when the x
>> coordinate of the mouse press is 150.
>
> ...stuff removed....
>
>>
>> On Fri, Jan 22, 2010 at 1:18 PM, pat marion <pat.marion at kitware.com>
>> wrote:
>>>
>>> Using vtkPropPicker::PickProp it is difficult to pick lines (using a
>>> vtkLineSource with a vtkPolyDataMapper for example).  Even if I set the line
>>> width to 10 pixels, the pick is only successful if I click exactly in the
>>> center of the 10 pixel band, as if the hardware picker was not respecting
>>> the 10 pixel width.  Can someone that is familiar with this part of vtk
>>> verify the bug, or point me in the right direction?
>>>
>>> Pat
>>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>



More information about the vtk-developers mailing list