SoView2DSetPosition

InventorModule
genre View2D
author Christian Schumann
package FMEstable/ReleaseMeVis
dll SoView2DExtensions
definition SoView2DExtensions.def
inherits from SoView2DExtension
keywords slice, sync, position

Purpose

Sets the slice index of connected SoView2D modules such that a given position is matched best. Hence, it can be used for the synchronization of several SoView2D modules.

Usage

Connect like any other extension to your SoView2D.

Details

The implementation is kind of a workaround that will lead to two redraws! The reason for that is, that extensions are not supposed to change SoView2D except during the evalEvent method. However, this extension is not interactive. Instead, the value of the position field is set from outside. That field change (of the position field) leads to a redraw of the SoView2D before the SoView2D.startSlice can be set by the extension. The draw() method in the extension is now mainly used to build a list of the connected SoView2D modules, as the extensions do not know to which SoView2D modules they are connected. The forceRedraw field is then triggered by the python script which leads to an update of the SoView2D.startSlice field of each collected SoView2D, which leads again to a redraw.

Windows

Default Panel

../../../Projects/SoView2DSetPosition/Modules/mhelp/Images/Screenshots/SoView2DSetPosition._default.png

Output Fields

self

name: self, type: SoNode

The inventor node to be connected to your scene graph.

Parameter Fields

Field Index

alt: Enum cursorShape: Enum needsValidVoxel: Bool
button1: Enum drawingOn: Bool position: Vector3
button2: Enum editingOn: Bool renderOnSlab: Bool
button3: Enum fixZOn: Bool selectionTolerance: Float
clipToSlice: Bool forceRedraw: Trigger setEventHandled: Bool
color: Color ignoreHandledEvents: Bool shift: Enum
control: Enum In Position: Vector3 wantsAllEvents: Bool
createNewMode: Bool interactionProviderID: String wantsKeyEvents: Bool
createNewModeRequest: Trigger maskValid: Bool wantsMouseWheelEvents: Bool

Visible Fields

In Position

name: inPosition, type: Vector3, default: 0 0 0

The position to which the connected viewers should slice.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

see SoView2DExtension.interactionProviderID

drawingOn

name: drawingOn, type: Bool, default: TRUE

see SoView2DExtension.drawingOn

editingOn

name: editingOn, type: Bool, default: TRUE

see SoView2DExtension.editingOn

maskValid

name: maskValid, type: Bool, persistent: no

fixZOn

name: fixZOn, type: Bool, default: TRUE

color

name: color, type: Color, default: 1 1 1

see SoView2DExtension.color

selectionTolerance

name: selectionTolerance, type: Float, default: 4

needsValidVoxel

name: needsValidVoxel, type: Bool, default: TRUE

see SoView2DExtension.needsValidVoxel

button1

name: button1, type: Enum, default: IGNORED

see SoView2DExtension.button1

button2

name: button2, type: Enum, default: IGNORED

see SoView2DExtension.button2

button3

name: button3, type: Enum, default: IGNORED

see SoView2DExtension.button3

shift

name: shift, type: Enum, default: IGNORED

see SoView2DExtension.shift

control

name: control, type: Enum, default: IGNORED

see SoView2DExtension.control

alt

name: alt, type: Enum, default: IGNORED

see SoView2DExtension.alt

wantsAllEvents

name: wantsAllEvents, type: Bool, default: FALSE

wantsKeyEvents

name: wantsKeyEvents, type: Bool, default: FALSE

wantsMouseWheelEvents

name: wantsMouseWheelEvents, type: Bool, default: FALSE

setEventHandled

name: setEventHandled, type: Bool, default: FALSE

see SoView2DExtension.setEventHandled

ignoreHandledEvents

name: ignoreHandledEvents, type: Bool, default: FALSE

see SoView2DExtension.ignoreHandledEvents

createNewMode

name: createNewMode, type: Bool, default: FALSE

see SoView2DExtension.createNewMode

createNewModeRequest

name: createNewModeRequest, type: Trigger

see SoView2DExtension.createNewModeRequest

renderOnSlab

name: renderOnSlab, type: Bool, default: FALSE

clipToSlice

name: clipToSlice, type: Bool, default: FALSE

cursorShape

name: cursorShape, type: Enum, default: UNDEFINED_CURSOR

see SoView2DExtension.cursorShape

position (hidden)

name: position, type: Vector3, persistent: no

forceRedraw (hidden)

name: forceRedraw, type: Trigger