在线演示

Scene Orbiter

The SceneOrbiter is a new viewer component class that combines the convenient "examiner viewer" camera interaction with a dramatic improvement in the user experience.  Unlike previous Open Inventor examiner viewers, e.g. SoQtExaminerViewer and SceneExaminer, interacting with the Scene Orbiter is modeless!  Let's explore what that means for the users of your application.

With Open Inventor 10, we are continuing to provide new and improved tools to enhance the user experience for Open Inventor based applications.  Another example is the Halo Highlighting feature that provides an elegant visual indication for selected objects.

Examiner viewers are the most commonly used viewer classes in Open Inventor applications.  An examiner viewer allows the user to click and drag on a "virtual trackball" that intuitively rotates the camera around a point of interest (look-at point) in the 3D scene.  This type of camera behavior is also called "orbit" because the camera moves around the point of interest.  Examiner viewers also allow the user to "pan" (move the camera in the view plane) and "dolly" (move the camera forward and backward).

The classic examiner viewer is always either in viewing mode or in selection mode.  In viewing mode, the "hand" cursor is displayed and mouse events are sent to the viewer, allowing the user to control the camera.  In selection mode, the "arrow" cursor is displayed and mouse events are sent to the scene graph, allowing the user to control draggers (for example to move an object in the scene).  By default, pressing the ESC key toggles between these two modes.  This can make some interactions very inefficient.  For example, when it is necessary to adjust the camera while moving an object in the scene.  This can also frustrate the user because of "mode errors", in which the user performs an action that is not valid in the current mode.  An unrelated, but infamous, source of mode errors is the CapsLock key.

ExaminerViewer cursors

The SceneOrbiter class uses a modern modeless style and avoids these problems by interpreting the user's intention.

  • If the user presses mouse button 1 over an object that handles events:
    For example, an SoTabBoxDragger, then events are handled by that object.
  • If the user clicks and releases the mouse button without moving
    (more than a small threshold), that click can be interpreted as a selection.
  • Finally, if the user clicks and drags the mouse
    (more than the threshold), then mouse events are handled by the SceneOrbiter and control the camera.

With this modeless style, it is not necessary to change the cursor shape to indicate the current mode.  You can see this behavior in the animation below (using the QtRenderAreaOrbiter example program included in the Open Inventor SDK).

  • Clicking on one of the cubes
    causes the shape to be selected (and highlighted).
  • Clicking and dragging anywhere in the scene
    (including over one of the cubes) moves the camera.
  • Clicking on the SoViewingCube
    triggers its interaction (moving the camera to a new orientation).

 

Standard QtRenderAreaOrbiter example program

The SceneOrbiter viewer component is a node, similar to the SceneExaminer, that can be inserted in the scene graph to provide camera interaction.  The RenderAreaOrbiter viewer component is a RenderArea that automatically creates a SceneOrbiter node.  A version of this class is provided for C++ (using Qt), for .NET (using WPF), and for Java. The viewer components are a modern alternative to the classic Open Inventor viewer classes like SoXtExaminerViewer.  Viewer component classes come with source code and can be customized to match your application's requirements. 

The SceneOrbiter is particularly convenient when using the new SoViewingCube node because it allows the user to freely interact with the camera, the scene, or the viewing cube.  Read more about SoViewingCube here.