Purpose

The module SoCustomExaminerViewer provides additional camera control buttons for axial, sagittal, and coronal views and allows to customize the display of all viewer buttons.

Furthermore, it adds camera control to the picking mode by taking advantage of an six degrees of freedom input device and the user's bi-manual control skills.

Usage

Connect an Open Inventor scene graph to the viewer.

Details

The display of the following button groups can be customized:

Buttons Function
../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-pickMode.png ../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-viewMode.png Picking and Viewing mode
../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-gotoHome.png ../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-setHome.png Home and Set Home camera parameters
../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-viewAll.png View entire scene (View All)
../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-seek.png Seek
../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-axial.png ../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-sagittal.png ../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-coronal.png ../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-opposite.png Axial, Sagittal, Coronal, and Opposite Side View
../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-persp.png Projection Type (perspective, orthographic)
../../../Modules/Inventor/SoCustomViewer/mhelp/Images/SoCustomExaminerViewer-dolly.png Display 'Dolly' instead of 'Zoom' for perspective projection type

A Spacemouse or Spaceball can be used to control the virtual camera of the SoCustomExaminerViewer by using the less-dominant hand of the user. The camera is positioned on a virtual sphere surrounding the displayed scene whereby an automatic reorientation maintains the focal point. The distance of the virtual camera to the focal point can be changed by moving the cap or ball of the input device to or away from the screen in front of the user. The position of the virtual camera on the sphere is controlled by the rotation of the cap or ball.

Windows

Default Panel

../../../Modules/Inventor/SoCustomViewer/mhelp/Images/Screenshots/SoCustomExaminerViewer._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 Rotation Axis: Vector3
antialiasing: Bool Headlight: Bool Rotation Current Step: Integer
antialiasingNumPasses: Integer height: Float Rotation Steps: Integer
Append count: Bool Initial: Enum rotationStopped: Trigger
Apply: Enum Input Devices: String Save Camera: Bool
Auto apply user setting: Bool Interactive Draw Style: Enum Save Position: Trigger
Auto Clipping: Bool isCameraStored: Bool Set Label (overwriteDollyWheelLabel): Bool
Auto Redraw When Recording: Bool Keyboard Events: Enum Set Label (overwriteRotXWheelLabel): Bool
Auto update: Bool Label (Orthographic) (dollyWheelOrthographicText): String Set Label (overwriteRotYWheelLabel): Bool
Automatic View All: Bool Label (Orthographic) (rotXWheelOrthographicText): String Show Dolly Wheel: Bool
Background: Color Label (Orthographic) (rotYWheelOrthographicText): String Show Rotate X Wheel: Bool
border: Bool Label (Perspective) (dollyWheelPerspectiveText): String Show Rotate Y Wheel: Bool
boundingBoxCaching: Enum Label (Perspective) (rotXWheelPerspectiveText): String Show snapshot: Bool
Cancel: Trigger Label (Perspective) (rotYWheelPerspectiveText): String Snap Count: Integer
Choose Observer View: Enum Left Button Events: Enum Snapshot Format: Enum
Continue: Trigger Mid Button Events: Enum Start (startRecording): Trigger
Create Movie: Trigger Mouse Interaction: String Start (startRotation): Trigger
Create Snapshot: Trigger Movie Framerate: Float Status: String
Current Camera: Enum nearDistance: Float Stereo Viewing: Bool
Cursor: Bool Num Samples: Integer Stop (stopRecording): Trigger
Decoration: Bool Offset: Float Stop (stopRotation): Trigger
Draw Style: Enum orientation: Rotation Stop animating: Trigger
Enable axial, sagittal, coronal, opposite buttons: Bool Output Movie File: String Store Current Orientation: Trigger
Enable home and set home buttons: Bool outputSnapshotFileWritten: String Store Current State: Bool
Enable Motion3Event camera control: Bool perspective: Bool transformDeltaIn: Matrix
Enable picking and viewing buttons: Bool pickCulling: Enum Transparency: Enum
Enable projection type buttons: Bool Popup menu: Bool Update: Trigger
Enable seeking button: Bool position: Vector3 Use Sample Buffers: Bool
Enable view all button: Bool Record Rotation: Bool User Orientation: Rotation
farDistance: Float Record Single Frame: Trigger View All: Trigger
feedback: Bool renderCaching: Enum viewAllFlag: Bool
feedbackSize: Integer renderCulling: Enum Viewing: Bool
File: String rescanScene: Trigger zoomIn: Trigger
focalDistance: Float Reset Position: Trigger zoomOut: Trigger
forceRedrawOnInteraction: Bool Right Button Events: Enum  
Grab Framerate: Float Rotation Angle: Float  

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

If checked, the viewer renders polygons with anti-aliasing (MSAA).

Num Samples

name: numSamples, type: Integer, default: 8

Sets the number of sample points for anti-aliasing (MSAA).

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.

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.

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.

Input Devices

name: inputDevicesList, type: String

Sets the device class names separated by spaces.

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.

Enable picking and viewing buttons

name: enablePickNView, type: Bool, default: TRUE

If checked, buttons for toggling picking/viewing mode are shown.

Enable home and set home buttons

name: enableHome, type: Bool, default: FALSE

If checked, buttons for set/go to home are shown/

Enable view all button

name: enableViewAll, type: Bool, default: TRUE

If checked, a view all button is shown.

Enable seeking button

name: enableSeek, type: Bool, default: FALSE

If checked, a seeking button is shown.

Enable axial, sagittal, coronal, opposite buttons

name: enableASC, type: Bool, default: TRUE

If checked, buttons for axial, sagittal, coronal and opposite viewing are shown.

Enable projection type buttons

name: enableProjType, type: Bool, default: FALSE

If checked, a button for toggling perspective/orthographic view is shown.

Show Rotate X Wheel

name: enableRotXWheel, type: Bool, default: TRUE

Show Rotate Y Wheel

name: enableRotYWheel, type: Bool, default: TRUE

Show Dolly Wheel

name: enableDollyWheel, type: Bool, default: TRUE

Set Label (overwriteDollyWheelLabel)

name: overwriteDollyWheelLabel, type: Bool, default: FALSE

If checked, a button for dolly is shown instead of a zoom button.

Set Label (overwriteRotXWheelLabel)

name: overwriteRotXWheelLabel, type: Bool, default: FALSE

Set Label (overwriteRotYWheelLabel)

name: overwriteRotYWheelLabel, type: Bool, default: FALSE

Label (Perspective) (dollyWheelPerspectiveText)

name: dollyWheelPerspectiveText, type: String, default: Dolly

Label (Perspective) (rotXWheelPerspectiveText)

name: rotXWheelPerspectiveText, type: String, default: Rotx

Label (Perspective) (rotYWheelPerspectiveText)

name: rotYWheelPerspectiveText, type: String, default: Roty

Label (Orthographic) (dollyWheelOrthographicText)

name: dollyWheelOrthographicText, type: String, default: Zoom

Label (Orthographic) (rotXWheelOrthographicText)

name: rotXWheelOrthographicText, type: String, default: Rotx

Label (Orthographic) (rotYWheelOrthographicText)

name: rotYWheelOrthographicText, type: String, default: Roty

Enable Motion3Event camera control

name: enableM3Control, type: Bool, default: FALSE

If checked, the viewer evaluates SoMotion3 events emitted by device drivers (e.g. by a SoQtSpacemouse).

Choose Observer View

name: chooseView, type: Enum, default: VIEW_ANTERIOR

Defines a predefined view.

Note that this works only if the scene's camera has already been located by the viewer.

Values:

Title Name
Anterior VIEW_ANTERIOR
Posterior VIEW_POSTERIOR
Left VIEW_LEFT
Right VIEW_RIGHT
Superior VIEW_SUPERIOR
Inferior VIEW_INFERIOR

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

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

zoomIn

name: zoomIn, type: Trigger

zoomOut

name: zoomOut, type: Trigger

transformDeltaIn

name: transformDeltaIn, type: Matrix, default: 1 0 0 0, 0 1 0 0, 0 0 1 0, 0 0 0 1

Table Of Contents