[vtk-developers] Some picking related changes....

Will Schroeder will.schroeder at kitware.com
Tue May 6 13:38:20 EDT 2003


Hi Folks-

FYI- Due to some excellent detective work from Kathleen Bonnell at LLNL 
National Lab, I am changing some picking behavior that in some rare cases 
may produce different (but better) results. Picking is used pervasively in 
VTK (including in widgets) so beware if you see strange behavior.

Here's a description if you really want it:
The problem is that cells picked at a certain parametric coordinate t along 
a line, might lie within the tolerance of the pick, but are really not the 
right answer. For example, a pick against two triangles A&B, the first pick 
hitting triangle A just outside of A but within the tolerance; and then 
picking B (B's pick is inside) will return A (even though B's pick was 
inside the triangle) because A&B are picked at the same parametric 
coordinate value, and the comparison is t<tMin, and A was picked first. The 
picking methods have been modified to look for picks within a tolerance of 
the nearest pick, and then to choose the cell closest to the line (based on 
parametric distance). Affected classes are vtkPointPicker, vtkCellPicker, 
vtkCellLocator.

Another change: picking non-planar quads. (Non-planar quads---especially 
those found as the faces of hexahedra---are common.) Now the quad is 
uniquely tessellated (using a combined Delaunay and point ordering scheme 
to break ties) and the resulting two triangles are picked.

And some bugs: the cell locator was occasionally not including cells in the 
list of cells in a bucket.

I'll be checking this stuff in over the next few days. Yell if necessary.

Will






More information about the vtk-developers mailing list