First of all, I tried to build the TouchGestureViewer example (from https://gitlab.kitware.com/vtk/vtk/tree/master/Examples/GUI/Qt/TouchGestureViewer) using VTK8.2.0 and Qt5.12.6 on Windows10(64 bit) surface.
But I see these error messages:
'EndGesture': is not a member of 'vtkInteractorStyleMultiTouchCameraExample' QtVTKTouchscreenRenderWindows.cxx (257)
'StartGesture': is not a member of 'vtkInteractorStyleMultiTouchCameraExample' QtVTKTouchscreenRenderWindows
Is there anything that I am missing? But, all other examples work fine on my machine.
Secondly, I have a QML application that renders VTK enabled 3D graphics. How should I be able integrate touch gestures on VTK window that is inside a QML item?
Do you mean that you took TouchGestureViewer example from one VTK version and tried to use it in a different VTK version? You probably need to backport all related changes into your VTK version.
We use VTK in a ctkVTKAbstractView and we know it works well there. I would recommend to check first that it works for you in classic Qt application/widget and then try if it works in QML as well.
vtkInteractorStyleMultiTouchCameraExample doesn’t implement, override nor inherit any methods called
StartGesture() hence the error. Why such error is in that example left me scratching my head…
Anyway, I suggest replacing
OnEndRotate(), if the swipe gesture is meant to rotate the model. The forementioned methods are both defined in
vtkInteractorStyleMultiTouchCamera. See whether those work.
Which VTK version are you using? Maybe the example was not updated according to recent changes in VTK API.
The documentation I cited is supposed to be that of the latest (nightly build). The offending methods are not there. Maybe someone should contact the author of the example to report this.
Thank you very much for your replies. I am using VTK8.2.0 latest release.
I tried to use use OnStartRotate() and OnEndRotate() methods (instead of StartGesture() and EndGesture() methods) as you mentioned. But, only methods available are OnStartSwipe() and OnStartSwipe() - even if I attempt to use these two methods I get these errors:
'vtkInteractorStyleMultiTouchCameraExample::OnStartSwipe': method with override specifier 'override' did not override any base class methods
‘vtkInteractorStyleMultiTouchCameraExample::OnEndSwipe’: method with override specifier ‘override’ did not override any base class methods
I am using VTK8.2.0 latest release.
The only example I can find on Touch gesture is https://gitlab.kitware.com/vtk/vtk/merge_requests/5679
But, it looks like it is outdated.
Is there any other example available? How could we inform the author of this example for possible updates?
Thanks a lot.
Strange… Both methods are implemented in
vtkInteractorStyleMultiTouchCameraExample's superclass: https://vtk.org/doc/nightly/html/classvtkInteractorStyleMultiTouchCamera.html .
vtkInteractorStyleMultiTouchCameraExample should’ve inherited them. Do you have older versions of VTK in your system?
I have one and only version of VTK (8.2.0) installed. I have checked and confirmed that no other older version exits in my machine.
I am trying to build Sunderlandkyl (https://gitlab.kitware.com/Sunderlandkyl) example.
It looks like something is missing!
Your help is much appreciated!
The Qt touchscreen support was added after VTK 8.2.0. It should work if you try with the latest VTK.
Thanks for your reply.
I believe I have got the latest version of VTK (which is 8.2.0) downloaded recently from https://vtk.org/download/
Could you please help me find the latest version of the touchscreen example you provided?
I am using this one: https://gitlab.kitware.com/vtk/vtk/tree/6488ef5d38d2eae1ff79d78a0922a7f5b6af828f/Examples/GUI/Qt/TouchGestureViewer
Please let me know if this is correct.
Thank you once again.
After 8.2.0? According to https://vtk.org/download/, 8.2.0 is the latest. So, what is later than the latest?
There have been no releases since 8.2.0, so if you would like to compile the example you will need to compile VTK from the master branch (which is 8.90.0).
I will try with the master branch (8.90.0) to compile Kyle’s touchscreen example and will report my findings here.
Once again, thank you Paulo and Kyle for your responses.