That’s correct. I also tested some other widgets such as
using standard boilerplate code:
auto iren = ren->GetRenderWindow()->GetInteractor();
And it works fine. I suspect that my issue with
vtkCameraOrientationWidget is from
SetParentRender() design which is different than other widgets.
For other widgets, the workflow is 1) setup widget representation. 2) setup widget interactor which is the interactor in my renderwindow. 3) enable widget. So there is only one renderer and one layer in renderwindow and the widget is rendered in this renderer.
vtkCameraOrientationWidget, it is a little bit different as it creates a second renderer which is overlaid on my main renderer. So my renderwindow has two layers: layer 0 for my main renderer and layer 1 for a new renderer which renders
vtkCameraOrientationWidget. Per instruction, I just have to do
// Enable the widget.
Everything that I described above just happened inside
SetParentRenderer(renderer). But there is no interaction. This particular design doesn’t fit my QtQuick framework or at least I am missing something. I am really confused.