Cannot pick vtkActor inside vtkOrientationMarkerWidget.

Hi friends,
I’m using vtk9.3 to build a 3D render app. I want to create a ‘viewcube’ with vtkOrientationMarkerWidget, here is what I’ve done:

  1. create 6 face actors;
  2. create a vtkAssembly and add face actors as parts;
  3. set the vtkAssembly to vtkOrientationMarkerWidget as marker;
    now, I have the vtkOrientationMarkerWidget in render window, but I cannot pick any assembly/actor of the vtkOrientationMarkerWidget.
    I got a lot of sample code from google & AI, but none of them works.

Any suggestion to pick vtkActor inside vtkOrientationMarkerWidget? or there is no way to achieve this?

Thanks everyone!

Hello @tomdong

Can you explain what you intend to do upon picking one of those 6 face actors. The assembly is definitely picked by default, but that widget doesn’t implement a whole lot besides letting you drag the widget around. Do you want to re-orient the camera to view down that axis?

Thanks for your reply @jaswantp , I just found the reason to my question:
the orientation-marker-widget is rendered by another render, it’s not the same as default 3d model render, once I pass the correct renderer to pick function, I can pick the vtkAssembly/path inside the vtkOrientationMarkerWidget using mouse.

Thanks again :slightly_smiling_face: