class OverlayNavigationCube : public OverlayItem
Overlay navigation cube used for navigation and orientation in a View.
The navigation cube is a navigation tool to be positioned in a corner and aid 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.
Enumerator for each of the navigation cube six faces.
Positive X navigation cube face.
Negative X navigation cube face.
Positive Y navigation cube face.
Negative Y navigation cube face.
Positive Z navigation cube face.
Negative Z navigation cube face.
- enumerator NCF_X_POS
virtual unsigned int width() const
Returns the width of the navigation cube viewport in pixels.
virtual unsigned int height() const
Returns the height of the navigation cube viewport in pixels.
virtual void setSize(unsigned int width, unsigned int height)
Sets the size of the navigation cube, in pixels.
virtual int priority() const
Returns the render priority of the item.
virtual void setPriority(int priority)
Sets render priority of the item.
The render priority determines the order in which item get rendered. Items with lower priorities get rendered first. The default priority is 20.
bool updateHighlight(int winCoordX, int winCoordY, const View &view)
Updates the navigation cube highlighting.
Returns true if a redraw of the view is needed (due to changes in the highlighting)
bool processSelection(int winCoordX, int winCoordY, const View &view, Vec3d *viewDir, Vec3d *up)
Finds the new view direction and up vector based on the user clicking at the given winCoordX, winCoordY coordinate.
The method returns true and updates the viewDir and up with the appropriate values if a part of the navigation cube was hit.
void setHome(const Vec3d &viewDirection, const Vec3d &up)
Sets the view direction and up vector for the “home” icon in the navigation cube.
void setAxisArrowColors(const Color3f &xAxisColor, const Color3f &yAxisColor, const Color3f &zAxisColor)
Sets the color of the x,y and z axis arrows.
- enum NavCubeFace