A bug of touch event processed in QVTKInteractorAdapter.
Qt version: 6.2.4
VTK version: latest master
In file 'QVTKInteractorAdapter.cxx', line 221 & line 243, function 'QVTKInteractorAdapter::ProcessEvent':
When I used QVTKWidget in Qt and try to use vtkInteractorStyleMultiTouchCamera, I found that touch event(single finger) is not responded. But Qt Gesture(more than one figures) worked well.
So I dig into the QVTKInteractorAdapter and found that when 'QVTKInteractorAdapter::ProcessEvent' processed the touch event, QTouchEvent::TouchPoint::id() is directly used as total touch point number. This number should not be larger than 5 as default. However, Qt document notes that we can not assume that ID numbers start at zero or that they are sequential(see also https://doc-snapshots.qt.io/qt6-dev/qeventpoint.html#id-prop). And in my case, the id is always larger than 5. Source code section:
Q_FOREACH (const QTouchEvent::TouchPoint& point, e2->points())
{
//VTKI_MAX_POINTERS=5
if (point.id() >= VTKI_MAX_POINTERS){
break;
}
...
}
So can we avoid to use QTouchEvent::TouchPoint::id() and try to determine the touch point number by length of input array or add index for loop.