[vtkusers] vtkCellPicker and "thin" objects

David Gobbi david.gobbi at gmail.com
Thu Sep 20 16:38:06 EDT 2012


Hi Robert,

The cell picker always chooses the object that is parametrically
closest to, and that generally means that 3D cells will be picked
before 2D cells, and 2D cells will be picked before lines, etc.  There
is no simple fix without re-writing the picker code so that it
prioritizes cells by dimensionality, i.e. points first, then lines,
then faces, then 3D cells.  Likewise the picker could also be made to
prioritize small (or thin) objects over larger objects, to allow e.g.
a small pixel-sized facet to be picked even if it is surrounded by
much larger facets.  Do you have any desire to look into
vtkCellPicker.cxx to see what would have to be done?

 - David


On Thu, Sep 20, 2012 at 1:49 PM, Robert Dean <bob.dean at gmail.com> wrote:
> Hello,
>
> I have two styles of actors in my scene. the first is a height map using 0.1
> m square cells representing the world seen by a robot sensor. On top of this
> I place planes representing detected walls.  Both the grid cells and walls
> are drawn using triangle strips.  So the wall consists of a plane made up of
> 4 points.
>
> With vtkCellPicker I can pick the cells in the height map with no
> difficultly. But I can only select a subset of the walls.  I think the cause
> is that the walls are planes, and therefore too skinny for the picker to
> pick. I tried changing the picker tolerance, but it actually made the
> problem worse.
>
> Does this logic make sense? I am tempted to render the walls as skinny boxes
> to see if it makes a difference.
>
> -Bob



More information about the vtkusers mailing list