[vtk-developers] Possible bug in vtkAreaPicker
Carloscol
carloscoli3 at gmail.com
Mon Jan 28 07:20:15 EST 2013
Hi,
I’m still using VTK 5.8 as I use it in conjunction with Activiz and I think
that there is a bug in vtkAreaPicker. This bug was reported before in
http://vtk.1045678.n5.nabble.com/vtkAreaPicker-bug-td1253446.html#a1253453.
But it has not been resolved yet even in 5.10.1 (in the repository the
mapper->GetBounds(bounds); is still valid)
The AreaPicker class only picks actors properly if the position is not
modified. This happens because the bounds for checking are taken from the
mapper instead from the actor. The solution given in the link works for me.
double *bds = propCandidate->GetBounds();
for (int i = 0; i < 6; i++)
{
bounds[i] = bds[i];
}
I would like to make some other suggestions regarding the
vtkInteractorStyleRubberBandPick interactor Style.
1. I have seen some problems while debugging in the Pick method in:
vtkAreaPicker *areaPicker = vtkAreaPicker::SafeDownCast(picker);
Sometimes areaPicker is null so the pick() method is called instead
AreaPicker. I do not know the reason as I’m not a really C++ developer. I
have solve the problem creating a myAreaPicker variable in the
RenderWindowInteractor class and a GetAreaPicker() direct method to have
access to it instead using downcast.
2. The RubberBandPick Style does not highlight the selected items for the
AreaPicker. I would suggest to create a method similar to
HighlightPropCollection in order to mark them all.
Finally I think that the tests for the vtkAreaPicker class are really
performed with the vtkRendererAreaPicker class, that it is not the same.
Regards
Carlos
--
View this message in context: http://vtk.1045678.n5.nabble.com/Possible-bug-in-vtkAreaPicker-tp5718123.html
Sent from the VTK - Dev mailing list archive at Nabble.com.
More information about the vtk-developers
mailing list