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

Visible Fields

Background

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

Sets the background color.

see also SoExaminerViewer.background

Transparency

name: transparency, type: Enum, default: BLEND

Defines the type of transparency used in the rendering.

see also SoExaminerViewer.transparency

Use Sample Buffers

name: useSampleBuffers, type: Bool, default: FALSE

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

see also SoExaminerViewer.useSampleBuffers

Num Samples

name: numSamples, type: Integer, default: 8

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

see also SoExaminerViewer.numSamples

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.

see also SoExaminerViewer.grabKeyFocus

Enable Key Commands

name: enableKeyCommands, type: Bool, default: TRUE

see SoRenderArea.enableKeyCommands

Snapshot Format

name: snapshotFormat, type: Enum, default: SNAPSHOT_RGB

Defines the format for snapshots.

see also SoExaminerViewer.snapshotFormat

Start (startRecording)

name: startRecording, type: Trigger

If pressed, the recording of a movie is started.

see also SoExaminerViewer.startRecording

Stop (stopRecording)

name: stopRecording, type: Trigger

If pressed, a recording in process is stopped.

see also SoExaminerViewer.stopRecording

Cancel

name: cancelRecording, type: Trigger

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

see also SoExaminerViewer.cancelRecording

Record Single Frame

name: singleFrame, type: Trigger

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

see also SoExaminerViewer.singleFrame

Continue

name: continueRecording, type: Trigger

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

see also SoExaminerViewer.continueRecording

Create Movie

name: createAvi, type: Trigger

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

see also SoExaminerViewer.createAvi

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.

see also SoExaminerViewer.outputAviFile

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.

see also SoExaminerViewer.autoRedrawWhenRecording

Grab Framerate

name: frameRate, type: Float, default: 7

Sets the refresh frame rate.

see also SoExaminerViewer.frameRate

Movie Framerate

name: frameRateAvi, type: Float, default: 15

Sets the frame rate for the target movie.

see also SoExaminerViewer.frameRateAvi

Status

name: status, type: String, persistent: no

Shows status information.

see also SoExaminerViewer.status

File

name: outputSnapshotFile, type: String, default: none

Sets the file name for the output snapshot file.

see also SoExaminerViewer.outputSnapshotFile

Append count

name: autoIncreaseFile, type: Bool, default: TRUE

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

see also SoExaminerViewer.autoIncreaseFile

Update

name: updateMLOutput, type: Trigger

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

see also SoExaminerViewer.updateMLOutput

Create Snapshot

name: doSnapshot, type: Trigger

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

see also SoExaminerViewer.doSnapshot

Show snapshot

name: showSnapshotWithShell, type: Bool, default: FALSE

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

see also SoExaminerViewer.showSnapshotWithShell

Snap Count

name: snapCount, type: Integer, default: 0

Sets a counter offset for consecutive snapshot file names.

see also SoExaminerViewer.snapCount

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.

see also SoExaminerViewer.headlight

Decoration

name: decoration, type: Bool, default: TRUE

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

see also SoExaminerViewer.decoration

Viewing

name: viewing, type: Bool, default: TRUE

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

see also SoExaminerViewer.viewing

Auto Clipping

name: autoClipping, type: Bool, default: TRUE

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

see also SoExaminerViewer.autoClipping

Draw Style

name: drawStyle, type: Enum, default: VIEW_AS_IS

Defines the drawing style for still images.

see also SoExaminerViewer.drawStyle

Interactive Draw Style

name: interactiveDrawStyle, type: Enum, default: VIEW_LOW_COMPLEXITY

Defines the drawing style for rendering while navigating.

see also SoExaminerViewer.interactiveDrawStyle

View All

name: viewAll, type: Trigger

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

see also SoExaminerViewer.viewAll

Save Position

name: saveHomePosition, type: Trigger

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

see also SoExaminerViewer.saveHomePosition

Reset Position

name: resetToHomePosition, type: Trigger

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

see also SoExaminerViewer.resetToHomePosition

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).

see also SoExaminerViewer.initialCameraOrientation

Apply

name: applyCameraOrientation, type: Enum, default: CAMERA_KEEP_AS_IS

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

see also SoExaminerViewer.applyCameraOrientation

Current Camera

name: cameraType, type: Enum, default: CAMERA_PERSPECTIVE

Defines the type of the internal camera.

This is overwritten when using an external camera.

see also SoExaminerViewer.cameraType

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.

see also SoExaminerViewer.autoApplyUserSettingOrientation

User Orientation

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

Sets a user camera orientation.

see also SoExaminerViewer.userSettingOrientation

Store Current Orientation

name: storeAsUserSetting, type: Trigger

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

see also SoExaminerViewer.storeAsUserSetting

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.

see also SoExaminerViewer.automaticViewAll

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.

see also SoExaminerViewer.storeCurrentState

Save Camera

name: saveCamera, type: Bool, default: TRUE

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

see also SoExaminerViewer.saveCamera

Cursor

name: cursor, type: Bool, default: TRUE

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

see also SoExaminerViewer.cursor

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.

see also SoExaminerViewer.stereoViewing

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.

see also SoExaminerViewer.stereoOffset

Left Button Events

name: button1events, type: Enum, default: TO_VIEWER

Deprecated, rather use field Mouse Interaction below.

see also SoExaminerViewer.button1events

Mid Button Events

name: button2events, type: Enum, default: TO_VIEWER

Deprecated, rather use field Mouse Interaction below.

see also SoExaminerViewer.button2events

Right Button Events

name: button3events, type: Enum, default: TO_VIEWER

Deprecated, rather use field Mouse Interaction below.

see also SoExaminerViewer.button3events

Keyboard Events

name: keyEvents, type: Enum, default: TO_VIEWER

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

see also SoExaminerViewer.keyEvents

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.

see also SoExaminerViewer.animationEnabled

Stop animating

name: stopAnimating, type: Trigger

If pressed, all animations are stopped.

see also SoExaminerViewer.stopAnimating

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’

see also SoExaminerViewer.mouseInteraction

Start (startRotation)

name: startRotation, type: Trigger

If pressed, a rotating animation is started.

see also SoExaminerViewer.startRotation

Stop (stopRotation)

name: stopRotation, type: Trigger

If pressed, a rotating animation in progress is stopped.

see also SoExaminerViewer.stopRotation

Rotation Axis

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

Sets a rotation axis for a rotation animation.

see also SoExaminerViewer.rotationAxis

Rotation Angle

name: rotationAngle, type: Float, default: 360

Sets a rotation angle for a rotation animation.

see also SoExaminerViewer.rotationAngle

Rotation Steps

name: rotationSteps, type: Integer, default: 80

Sets the number of steps for a rotation animation.

see also SoExaminerViewer.rotationSteps

Rotation Current Step

name: rotationCurrentStep, type: Integer, persistent: no

Shows the current rotation animation step.

see also SoExaminerViewer.rotationCurrentStep

Record Rotation

name: recordRotation, type: Bool, default: TRUE

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

see also SoExaminerViewer.recordRotation

Enable zooming with mouse wheel

name: wheelZoomEnabled, type: Bool, default: FALSE

see SoExaminerViewer.wheelZoomEnabled

Enable rotation with shift key and mouse wheel

name: wheelRotationEnabled, type: Bool, default: FALSE

see SoExaminerViewer.wheelRotationEnabled

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, deprecated name: enableDolly

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

miSelectedPointingAction

name: miSelectedPointingAction, type: String, persistent: no

see SoRenderArea.miSelectedPointingAction

miSelectedPointingActionProvider

name: miSelectedPointingActionProvider, type: String, persistent: no

see SoRenderArea.miSelectedPointingActionProvider

miSelectedPointingActionActive

name: miSelectedPointingActionActive, type: Bool, persistent: no

see SoRenderArea.miSelectedPointingActionActive

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