Tool class for easily building a basic interactive OpenInventor application without using existing viewer classes. More...
#include <Inventor/ViewerComponents/nodes/SceneExaminer.h>
Public Types | |
enum | InteractionMode { NAVIGATION, SELECTION } |
enum | NavigationMode { ORBIT, PLANE } |
Public Member Functions | |
SceneExaminer () | |
virtual | ~SceneExaminer () |
void | enableSelection (bool enabled) |
bool | isSelectionEnabled () |
void | enableZoom (bool enabled) |
bool | isZoomEnabled () |
void | enablePan (bool enabled) |
bool | isPanEnabled () |
void | enableOrbit (bool enabled) |
bool | isOrbitEnabled () |
void | enableRotate (bool enabled) |
bool | isRotateEnabled () |
void | enableSeek (bool enabled) |
bool | isSeekEnabled () |
void | setNavigationMode (SceneExaminer::NavigationMode mode) |
SceneExaminer::NavigationMode | getNavigationMode () |
void | setInteractionMode (SceneExaminer::InteractionMode mode) |
SceneExaminer::InteractionMode | getInteractionMode () |
virtual void | setCameraMode (SceneInteractor::CameraMode mode) |
void | setSeekMode (bool onOrOff) |
void | addInteractionModeListener (SiInteractionModeListener *listener) |
void | removeInteractionModeListener (SiInteractionModeListener *listener) |
Tool class for easily building a basic interactive OpenInventor application without using existing viewer classes.
The SceneExaminer is an extension of the SceneInteractor node that allows providing the camera and headlight manipulations like panning, zooming and orbiting similar to the behavior of the classic Open Inventor viewer classes SoXtExaminerViewer (NavigationMode ORBIT) and SoXtPlaneViewer (NavigationMode PLANE). Similar behavior includes a 'headlight', i.e. an SoDirectionalLight node automatically aligned with the camera's view direction.
The SceneExaminer is not directly comparable with a classic OpenInventor viewer as it does not provide any GUI (no buttons, no popup menu) and fewer interactive features (no animation). However it does provide a touch event handler that allows manipulating a scene on a touch device.
See parent class SceneInteractor for more details about the structure of the internal scene graph.
The SceneExaminer uses an instance of SoCameraInteractor to manipulate the camera in response to OpenInventor events.
Notes:
Note: On MacOS, some GUI frameworks or viewers may match the Control (Ctrl) value to the Command (CMD) key on the keyboard.
SceneInteractor, SoCameraInteractor, SiInteractionModeListener
SceneExaminer::SceneExaminer | ( | ) |
Constructor.
virtual SceneExaminer::~SceneExaminer | ( | ) | [virtual] |
Destructor.
void SceneExaminer::addInteractionModeListener | ( | SiInteractionModeListener * | listener | ) |
Add interaction listener.
void SceneExaminer::enableOrbit | ( | bool | enabled | ) |
Enable or disable camera orbiting.
Default is true.
void SceneExaminer::enablePan | ( | bool | enabled | ) |
Enable or disable camera panning.
Default is true.
void SceneExaminer::enableRotate | ( | bool | enabled | ) |
Enable or disable camera rotation.
Default is true.
void SceneExaminer::enableSeek | ( | bool | enabled | ) |
Enable or disable seek.
Default is true.
void SceneExaminer::enableSelection | ( | bool | enabled | ) |
Enable or disable selection mode.
Default is true.
void SceneExaminer::enableZoom | ( | bool | enabled | ) |
Enable or disable zoom.
Default is true.
SceneExaminer::InteractionMode SceneExaminer::getInteractionMode | ( | ) |
Returns the current interaction mode.
SceneExaminer::NavigationMode SceneExaminer::getNavigationMode | ( | ) |
Returns the current navigation mode.
bool SceneExaminer::isOrbitEnabled | ( | ) |
Returns if camera orbiting is enabled.
bool SceneExaminer::isPanEnabled | ( | ) |
Returns if camera panning is enabled.
bool SceneExaminer::isRotateEnabled | ( | ) |
Returns if camera rotation is enabled.
bool SceneExaminer::isSeekEnabled | ( | ) |
Returns if seek is enabled.
bool SceneExaminer::isSelectionEnabled | ( | ) |
Returns if selection is enabled.
bool SceneExaminer::isZoomEnabled | ( | ) |
Returns if zoom is enabled.
void SceneExaminer::removeInteractionModeListener | ( | SiInteractionModeListener * | listener | ) |
Remove interaction listener.
virtual void SceneExaminer::setCameraMode | ( | SceneInteractor::CameraMode | mode | ) | [virtual] |
Set camera to perspective or orthographic.
Reimplemented from SceneInteractor.
void SceneExaminer::setInteractionMode | ( | SceneExaminer::InteractionMode | mode | ) |
Set interaction mode to navigation or selection.
Default is NAVIGATION.
void SceneExaminer::setNavigationMode | ( | SceneExaminer::NavigationMode | mode | ) |
Set navigation mode.
Default is ORBIT.
void SceneExaminer::setSeekMode | ( | bool | onOrOff | ) |
Set the interaction into or out off seek mode (default is off).