[vtkusers] Weird tolerance scaling in vtkPicker

Paul Harris harris.pc at gmail.com
Mon Apr 20 13:30:29 EDT 2009


Hi all,

I use a cube (1x1x1) as the input to a vtkGlyph3D mapper.  I then translate
the whole thing into position, expanding the X and Y scales drastically (eg
by x100), but not scaling the Z at all.  End result is a set of cubes now
flattened out to 100x100x1

When I use the cell picker with a tolerance of 0.005, I can click a good 1cm
away from the cube (on the screen) and it'll still pick the cube!   The cube
may be 3-4cm on the screen, so 1cm away is a long way away!

I have been looking through the code, and saw this line:
          t = this->IntersectWithLine(p1Mapper, p2Mapper,

tol*0.333*(scale[0]+scale[1]+scale[2]), path,
                                      static_cast<vtkProp3D
*>(propCandidate), mapper);

The tol scaling looks a bit bodgy, could be the source of my problems?

thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090421/02090f40/attachment.htm>


More information about the vtkusers mailing list