Class for displaying an orientation compass. More...
#include <TerrainViz/viewer/SoTVizCompass.h>
Public Types | |
enum | predefinedTerrainCompass { TERRAINCOMPASS_DEFAULT, TERRAINCOMPASS_REVERSED, TERRAINCOMPASS_TRANSPARENT } |
Public Member Functions | |
SoTVizCompass (SoTVizViewer &viewer) | |
virtual | ~SoTVizCompass () |
virtual void | loadFile (const char *fileName) |
virtual void | loadPredefined (predefinedTerrainCompass) |
virtual void | notifyOrientation (float newOrientation) |
This class is used to display a compass in SoTVizViewer. Three different compass designs are provided. The models are loaded from .iv files.
SoTVizNavigationToolBase, SoTVizNavigationTool, SoTVizViewer
SoTVizCompass::SoTVizCompass | ( | SoTVizViewer & | viewer | ) |
Constructor.
Needs a reference to SoTVizViewer to interact with.
virtual SoTVizCompass::~SoTVizCompass | ( | ) | [virtual] |
Destructor.
virtual void SoTVizCompass::loadFile | ( | const char * | fileName | ) | [virtual] |
Method to load the .iv file representing the compass.
The file root must contain two separator nodes, one named "CompassFixedPart" and the other named "CompassMobilePart" for the two parts of the compass. A rotation node is then internally inserted and centered to control the mobile part.
Implements SoTVizNavigationToolBase.
virtual void SoTVizCompass::loadPredefined | ( | predefinedTerrainCompass | ) | [virtual] |
Loads a predefined tool.
virtual void SoTVizCompass::notifyOrientation | ( | float | newOrientation | ) | [virtual] |
This method is called by SoTVizViewer to notify the tool about new orientation values (where the orientation is the rotation in radians around the north direction).
Reimplemented from SoTVizNavigationToolBase.