The OverlayNavigationCube is a navigation tool to be positioned in a corner and aids with model interaction. The navigation cube will always show the orientation of the camera and provides a simple and interactive way of navigating the view.
To utilize the navigation cube feature, it must be setup and connected to the mouse events in the viewer.
The navigation cube is an overlay item and is managed through the views Overlay. To show the navigation cube in the view, call:
When the mouse cursor hovers over the navigation cube, the corresponding face, edge, corner or arrow can be highlighted. To sync this with mouse movements, you need to call OverlayNavigationCube::updateHighlight() from the mouse move event.
When the user click on a face, edge, corder or arrow on the navigation cube, the navigation cube will readjust accordingly and the camera orientation must be synchronized. Call OverlayNavigationCube::processSelection() to update navigation cube and camera orientation.
This can be done in the simples form:
Or fancier, using camera animation:
See the demo apps for example code: