3D Navigation gizmo

Initially started with embedding QWidget within pqQVTKWidget but it was difficult to implement event handling. So I went ahead with 2nd gen VTK widgets framework.

I have a start on this. The work is in progress. MR

These were the things I needed to set it up.

  1. A gizmo actor with shafts and spheres with text on it. The shafts are unit-length oriented x-y-z in right-handed coordinate system. Use vtkFreeTypeTools to render text into an image data.

ImageData->Texture->EllipticalButtonSource-> image

  1. A little renderer (LAYER=1) overlaid on top of ParaView’s render view to house our gizmo actor at the origin.
    image

  2. Rotation, highlight mechanism for the gizmo. This will process mouse movements over the little renderer and rotate the gizmo actor.
    When rotated, it looks like this:
    image

  3. Control mechanism for the gizmo. Basically link gizmo’s rotation transform to ParaView’s render view’s active camera. This is proving to be harder than I thought. I tried to apply the inverse of the gizmo’s rotation transform to the camera, it rotates but not as expected.

What’s remaining:

  1. Link gizmo transform to renderview’s camera transform. (Like trackball-camera)
  2. Use Quaternions to lerp the renderview’s camera’s orientation to selected sphere’s direction.
1 Like