SoExaminerViewer

InventorModule
genre View3D
author Florian Link
package MeVisLab/Standard
dll SoViewers
definition SoViewers.def
see also SoCustomExaminerViewer, SoRenderArea
keywords rendering, scene, movie, recording, navigation, zoom, 3D

Purpose

The module SoExaminerViewer renders an Open Inventor scene and allows for interaction with and navigation of the scene.

It also offers facilities to generate movies.

Usage

This viewer uses a virtual trackball to rotate the scene. The point of rotation is by default the center of the scene bounding box, but can be placed anywhere in the scene. The viewer also allows you to translate in the screen plane, as well as dolly in and out (forward/backward movement).

On the right side, the viewer features the following buttons if decoration is turned on.

Viewer Button Function
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_pick.png Selects object manipulation mode (and deselects viewer mode). The cursor shape will change to an arrow. In this mode, the user is manipulating objects in the scene.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_view.png Selects viewer mode (and deselects object manipulation mode). The cursor shape will change to a hand icon. In this mode, the user is moving a virtual camera in 3D space.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_gethome.png Returns the virtual camera to its home position (initial position if not reset).
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_sethome.png Resets the home position to the current camera position.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_viewall.png Brings the entire scene into view. This functions is also available in the Action menu.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_seek.png Allows the user to select a new center of rotation for the virtual camera. When clicked on (and in viewer mode) the cursor changes to a crosshair. The next left mouse-button press causes whatever is underneath the cursor to be selected as the new center of rotation. Once the button is released, the camera animates to its new position.
../../../Modules/Inventor/SoViewers/mhelp/Images/viewer_cammode.png Selects the type of virtual camera used by the viewer. It toggles between the two available camera types -- perspective and orthographic.

The following functions can be controlled by the mouse itself.

Mouse/Keyboard Function
Left Rotate virtual trackball.
Middle / CTRL+Left Translate up, down, left, right.
CTRL+Middle / Left+Middle Dolly in and out.
'S' then click onto an object Sets a new rotation center (Seek function).
Right Pop-up menu if activated.

Windows

Default Panel

../../../Modules/Inventor/SoViewers/mhelp/Images/Screenshots/SoExaminerViewer._default.png

Input Fields

child

name: child, type: SoNode

Output Fields

outputImage

name: outputImage, type: Image

self (hidden)

name: self, type: SoNode

Parameter Fields

Field Index

Animation: Bool Grab Key Focus: Bool Right Button Events: Enum
antialiasing: Bool Headlight: Bool Rotation Angle: Float
antialiasingNumPasses: Integer height: Float Rotation Axis: Vector3
Append count: Bool Initial: Enum Rotation Current Step: Integer
Apply: Enum inputDevicesList: String Rotation Steps: Integer
Auto apply user setting: Bool Interactive Draw Style: Enum rotationStopped: Trigger
Auto Clipping: Bool isCameraStored: Bool Save Camera: Bool
Auto Redraw When Recording: Bool Keyboard Events: Enum Save Position: Trigger
Auto update: Bool Left Button Events: Enum Show snapshot: Bool
Automatic View All: Bool Mid Button Events: Enum Snap Count: Integer
Background: Color Mouse Interaction: String Snapshot Format: Enum
border: Bool Movie Framerate: Float Start (startRecording): Trigger
boundingBoxCaching: Enum nearDistance: Float Start (startRotation): Trigger
Cancel: Trigger Num Samples: Integer Status: String
Continue: Trigger Offset: Float Stereo Viewing: Bool
Create Movie: Trigger orientation: Rotation Stop (stopRecording): Trigger
Create Snapshot: Trigger Output Movie File: String Stop (stopRotation): Trigger
Current Camera: Enum outputSnapshotFileWritten: String Stop animating: Trigger
Cursor: Bool perspective: Bool Store Current Orientation: Trigger
Decoration: Bool pickCulling: Enum Store Current State: Bool
Draw Style: Enum Popup menu: Bool Transparency: Enum
farDistance: Float position: Vector3 Update: Trigger
feedback: Bool Record Rotation: Bool Use Sample Buffers: Bool
feedbackSize: Integer Record Single Frame: Trigger User Orientation: Rotation
File: String renderCaching: Enum View All: Trigger
focalDistance: Float renderCulling: Enum viewAllFlag: Bool
forceRedrawOnInteraction: Bool rescanScene: Trigger Viewing: Bool
Grab Framerate: Float Reset Position: Trigger  

Visible Fields

Background

name: background, type: Color, default: 0 0 0

Sets the background color.

Transparency

name: transparency, type: Enum, default: BLEND

Defines the type of transparency used in the rendering.

Values:

Title Name
Screen Door SCREEN_DOOR
Add ADD
Delayed Add DELAYED_ADD
Sorted Object Add SORTED_OBJECT_ADD
Blend BLEND
Delayed Blend DELAYED_BLEND
Sorted Object Blend SORTED_OBJECT_BLEND

Use Sample Buffers

name: useSampleBuffers, type: Bool, default: FALSE

Enables the usage of sample buffers for multi sample anti-aliasing (MSAA)

Num Samples

name: numSamples, type: Integer, default: 8

Sets the number of sample buffers to use. 0 means the maximum supported number of sample buffers is used.

Grab Key Focus

name: grabKeyFocus, type: Bool, default: TRUE

If checked, the viewer grabs the key focus whenever the mouse cursor is moved over the viewer.

Otherwise, the use has to click onto the viewer to focus it.

Snapshot Format

name: snapshotFormat, type: Enum, default: SNAPSHOT_RGB

Defines the format for snapshots.

Values:

Title Name
RGB SNAPSHOT_RGB
Grey SNAPSHOT_GREY

Start (startRecording)

name: startRecording, type: Trigger

If pressed, the recording of a movie is started.

Stop (stopRecording)

name: stopRecording, type: Trigger

If pressed, a recording in process is stopped.

Cancel

name: cancelRecording, type: Trigger

If pressed, a recording in process is stopped and all saved images are being removed.

Record Single Frame

name: singleFrame, type: Trigger

If pressed, the currently rendered image is saved to disc as a part of a movie.

Continue

name: continueRecording, type: Trigger

If pressed, the recording of a movie is paused if running, or resumed if paused.

Create Movie

name: createAvi, type: Trigger

If pressed, a movie of the frames you have recorded after pressing the Start button is created.

Output Movie File

name: outputAviFile, type: String

Sets the name of the output movie file.

If no filename is given, the movies are automatically created in the screenshot gallery.

Auto Redraw When Recording

name: autoRedrawWhenRecording, type: Bool, default: TRUE

If checked, the scene is getting redrawn anew when recording even if the scene is not being changed.

Grab Framerate

name: frameRate, type: Float, default: 7

Sets the refresh frame rate of the viewer.

Movie Framerate

name: frameRateAvi, type: Float, default: 15

Sets the frame rate for the target movie.

Status

name: status, type: String, default: off

Shows status information.

File

name: outputSnapshotFile, type: String, default: none

Sets the file name for the output snapshot file.

Append count

name: autoIncreaseFile, type: Bool, default: TRUE

If checked, the filenames bear the frame count in their names.

Update

name: updateMLOutput, type: Trigger

If pressed, the output ML image to current viewer image is being updated.

Auto update

name: autoUpdateML, type: Bool, default: FALSE

If checked, the output ML image is being updated on each viewer change.

Create Snapshot

name: doSnapshot, type: Trigger

If pressed, a snapshot of the current rendering is saved.

However, better press F11 in a viewer to create a snapshot that is automatically saved to the screenshot gallery.

Show snapshot

name: showSnapshotWithShell, type: Bool, default: FALSE

If checked, a newly created snapshot is opened with the system's default image viewer.

Snap Count

name: snapCount, type: Integer, default: 0

Sets a counter offset for consecutive snapshot file names.

Headlight

name: headlight, type: Bool, default: TRUE

If checked, the scene is illuminated with a default headlight.

Decoration

name: decoration, type: Bool, default: TRUE

If checked, the viewer's border are decorated with tool buttons.

Viewing

name: viewing, type: Bool, default: TRUE

If checked, the viewer is in navigation mode (rotating, panning). Otherwise, the viewer is in picking mode.

Auto Clipping

name: autoClipping, type: Bool, default: TRUE

If checked, the viewer clips the scene automatically at the default (frontal) clipping plane.

Draw Style

name: drawStyle, type: Enum, default: VIEW_AS_IS

Defines the drawing style for still images.

Values:

Title Name
As Is VIEW_AS_IS
Hidden Line VIEW_HIDDEN_LINE
No Texture VIEW_NO_TEXTURE
Low Complexity VIEW_LOW_COMPLEXITY
Line VIEW_LINE
Point VIEW_POINT
Bbox VIEW_BBOX
Low Res Line VIEW_LOW_RES_LINE
Low Res Point VIEW_LOW_RES_POINT
Wireframe Overlay VIEW_WIREFRAME_OVERLAY
Same As Still VIEW_SAME_AS_STILL

Interactive Draw Style

name: interactiveDrawStyle, type: Enum, default: VIEW_LOW_COMPLEXITY

Defines the drawing style for rendering while navigating.

Values:

Title Name
As Is VIEW_AS_IS
Hidden Line VIEW_HIDDEN_LINE
No Texture VIEW_NO_TEXTURE
Low Complexity VIEW_LOW_COMPLEXITY
Line VIEW_LINE
Point VIEW_POINT
Bbox VIEW_BBOX
Low Res Line VIEW_LOW_RES_LINE
Low Res Point VIEW_LOW_RES_POINT
Wireframe Overlay VIEW_WIREFRAME_OVERLAY
Same As Still VIEW_SAME_AS_STILL

View All

name: viewAll, type: Trigger

If pressed, the viewer centers on the bounding box of the attached scene.

Save Position

name: saveHomePosition, type: Trigger

If pressed, the current viewing direction and the focal point are being saved.

Reset Position

name: resetToHomePosition, type: Trigger

If pressed, a previously saved home viewing direction and focal point are being restored.

Initial

name: initialCameraOrientation, type: Enum, default: CAMERA_KEEP_AS_IS

Defines how the camera should view the scene initially (on opening the viewer or on pressing View All).

Values:

Title Name
Keep As Is CAMERA_KEEP_AS_IS
Axial CAMERA_AXIAL
Sagittal CAMERA_SAGITTAL
Coronal CAMERA_CORONAL
Head Profile CAMERA_HEAD_PROFILE
User Setting CAMERA_USER_SETTING

Apply

name: applyCameraOrientation, type: Enum, default: CAMERA_KEEP_AS_IS

Defines how the camera should view the scene on setting a value here.

Values:

Title Name
Keep As Is CAMERA_KEEP_AS_IS
Axial CAMERA_AXIAL
Sagittal CAMERA_SAGITTAL
Coronal CAMERA_CORONAL
Head Profile CAMERA_HEAD_PROFILE
User Setting CAMERA_USER_SETTING

Current Camera

name: cameraType, type: Enum, default: CAMERA_PERSPECTIVE

Defines the type of the internal camera.

This is overwritten when using an external camera.

Values:

Title Name
Perspective CAMERA_PERSPECTIVE
Orthographic CAMERA_ORTHOGRAPHIC

Auto apply user setting

name: autoApplyUserSettingOrientation, type: Bool, default: FALSE

If checked, the viewing direction defined in Apply is set as soon as the value in User Orientation is changed.

User Orientation

name: userSettingOrientation, type: Rotation, default: 0 0 1 0

Sets a user camera orientation.

Store Current Orientation

name: storeAsUserSetting, type: Trigger

If pressed, the current camera viewing direction is stored in User Orientation.

Automatic View All

name: automaticViewAll, type: Bool, default: FALSE

If checked, the viewer automatically shows the whole scene (computed on base of the bounding box) on opening the viewer or changing the attached scene.

Store Current State

name: storeCurrentState, type: Bool, default: TRUE

If checked, the viewer stores the current state every tick of settings like using a headlight, the draw style, showing decoration.

Save Camera

name: saveCamera, type: Bool, default: TRUE

If checked, the viewer saves if a perspective or an orthographic camera is used.

Cursor

name: cursor, type: Bool, default: TRUE

If checked, the mouse cursor over the viewer reflect the interaction/navigation state.

Stereo Viewing

name: stereoViewing, type: Bool, default: FALSE

If checked, stereo viewing is enabled. Note that stereo viewing needs to be supported by your graphic card.

Offset

name: stereoOffset, type: Float, default: 3

Sets an offset value for stereo viewing. This value describes how far the two alternating cameras are apart.

Left Button Events

name: button1events, type: Enum, default: TO_VIEWER

Deprecated, rather use field Mouse Interaction below.

Values:

Title Name
Scene TO_SCENE
Viewer TO_VIEWER
Scene And Viewer TO_SCENE_AND_VIEWER
Scene Or Viewer TO_SCENE_OR_VIEWER

Mid Button Events

name: button2events, type: Enum, default: TO_VIEWER

Deprecated, rather use field Mouse Interaction below.

Values:

Title Name
Scene TO_SCENE
Viewer TO_VIEWER
Scene And Viewer TO_SCENE_AND_VIEWER
Scene Or Viewer TO_SCENE_OR_VIEWER

Right Button Events

name: button3events, type: Enum, default: TO_VIEWER

Deprecated, rather use field Mouse Interaction below.

Values:

Title Name
Scene TO_SCENE
Viewer TO_VIEWER
Scene And Viewer TO_SCENE_AND_VIEWER
Scene Or Viewer TO_SCENE_OR_VIEWER

Keyboard Events

name: keyEvents, type: Enum, default: TO_VIEWER

Defines whether the viewer or the scene (or both) should react on keyboard events.

Values:

Title Name
Scene TO_SCENE
Viewer TO_VIEWER
Scene And Viewer TO_SCENE_AND_VIEWER
Scene Or Viewer TO_SCENE_OR_VIEWER

Animation

name: animationEnabled, type: Bool, default: FALSE

If checked, the scene will keep on turning if it is interactively turned and the mouse button is released in motion.

Stop animating

name: stopAnimating, type: Trigger

If pressed, all animations are stopped.

Mouse Interaction

name: mouseInteraction, type: String

Sets a sequence of mouse interactions as a string.

Syntax: '(*);function1:combo1,combo2,...;function2:...'

A * at the beginning clears the default mouse functions.

Available functions: pick, spin, pan, dolly, seek

Combos are represented by characters '123sca'

(left, middle, right, shift, control, alt resp.)

Big letters 'SCA' mean 'don't care about this modifier'

Example: '* spin:1 pan:1s,1c,2 dolly:12,2c,1sc'

Start (startRotation)

name: startRotation, type: Trigger

If pressed, a rotating animation is started.

Stop (stopRotation)

name: stopRotation, type: Trigger

If pressed, a rotating animation in progress is stopped.

Rotation Axis

name: rotationAxis, type: Vector3, default: 0 1 0

Sets a rotation axis for a rotation animation.

Rotation Angle

name: rotationAngle, type: Float, default: 360

Sets a rotation angle for a rotation animation.

Rotation Steps

name: rotationSteps, type: Integer, default: 80

Sets the number of steps for a rotation animation.

Rotation Current Step

name: rotationCurrentStep, type: Integer, default: 0

Shows the current rotation animation step.

Record Rotation

name: recordRotation, type: Bool, default: TRUE

If checked, the rotation animation is recorded once it has started.

Hidden Fields

renderCaching

name: renderCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

boundingBoxCaching

name: boundingBoxCaching, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

renderCulling

name: renderCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

pickCulling

name: pickCulling, type: Enum, default: AUTO

Values:

Title Name
On ON
Off OFF
Auto AUTO

border

name: border, type: Bool, default: FALSE

antialiasing

name: antialiasing, type: Bool, default: FALSE

antialiasingNumPasses

name: antialiasingNumPasses, type: Integer, default: 1

outputSnapshotFileWritten

name: outputSnapshotFileWritten, type: String, default: none

inputDevicesList

name: inputDevicesList, type: String

rescanScene

name: rescanScene, type: Trigger

viewAllFlag

name: viewAllFlag, type: Bool, default: FALSE

isCameraStored

name: isCameraStored, type: Bool, default: FALSE

perspective

name: perspective, type: Bool, default: TRUE

height

name: height, type: Float, default: 0

position

name: position, type: Vector3, default: 0 0 0

orientation

name: orientation, type: Rotation, default: 0 0 1 0

nearDistance

name: nearDistance, type: Float, default: 0

farDistance

name: farDistance, type: Float, default: 0

focalDistance

name: focalDistance, type: Float, default: 0

forceRedrawOnInteraction

name: forceRedrawOnInteraction, type: Bool, default: FALSE

feedback

name: feedback, type: Bool, default: FALSE

feedbackSize

name: feedbackSize, type: Integer, default: 32

rotationStopped

name: rotationStopped, type: Trigger