# 3D Navigation gizmo

**URL:** https://discourse.paraview.org/t/3d-navigation-gizmo/5743
**Category:** Development
**Tags:** proposal, vtk
**Created:** [November 7, 2020, 12:59pm UTC](https://discourse.paraview.org/t/3d-navigation-gizmo/5743 "2020-11-07T12:59:14Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jaswantp/32/11456_2.png) [@jaswantp](https://discourse.paraview.org/u/jaswantp)
#### Post date: [June 25, 2021, 10:48am UTC](https://discourse.paraview.org/t/3d-navigation-gizmo/5743/4 "2021-06-25T10:48:49Z")

</div>

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](https://gitlab.kitware.com/paraview/paraview/-/merge_requests/4995)

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](https://discourse.paraview.org/uploads/default/original/2X/8/885925fa4a14db63733e256f5613d29a59652c9b.png)

1. A little renderer (LAYER=1) overlaid on top of ParaView’s render view to house our gizmo actor at the origin.  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/9/961bd237d5755645a3a7a6419e284cf8b6b2d27a.png)

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](https://discourse.paraview.org/uploads/default/original/2X/9/981384ebcaf073b3d2b8436c85f8bc205c831dcb.png)

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.

---

_[View the full topic](https://discourse.paraview.org/t/3d-navigation-gizmo/5743)._
