Purpose

The module So3DMarkerEditor displays markers in 3D and allows to interactively edit the markers.

Usage

Since the module has an Open Inventor output, simply plug it into any kind of viewer. To synchronize the module with any other module that governs a XMarkerList, plug its output into the So3DMarkerEditor's input.

If there should be interactive placement and editing of the markers also plug the inventor scene to work on into the corresponding module's input. A StylePalette module can provide style information for the markers. At last, if there should be voxel position information displayed make sure to connect a SoMLWorldToVoxel module to the matrix transformation input.

The most of the parameters available on the panel and the overall user interaction were designed to be as conform as possible with the user interface and usage of the well known SoView2DMarkerEditor.

Interaction

The interaction is supposed to be as close as possible to the 2D interaction. While having a 2D input and output device, the interaction in 3D has to be limited in some way. In this approach we are limited to the surface of objects. However, with the options Edit 3D and Edit 3D vector checked, the markers can be moved in 3D along the x, y, or z axis.

Windows

Default Panel

../../../Modules/Inventor/So3DMarkerEditor/mhelp/Images/Screenshots/So3DMarkerEditor._default.png

Input Fields

stylePalette

name: stylePalette, type: MLBase, deprecated name: inputStylePalette

Optional style palette for unified rendering styles.

inputNode

name: inputNode, type: SoNode

Attach the Open Inventor scene on which picking should be performed to this input.

inputMatrixTransform

name: inputMatrixTransform, type: SoNode

Optional input for a matrix to render the texts at the correct location.

inXMarkerList

name: inXMarkerList, type: MLBase, deprecated name: inputXMarkerList

The XMarkerList to interact with.

Output Fields

self

name: self, type: SoNode

outXMarkerList

name: outXMarkerList, type: MLBase, deprecated name: outputXMarkerList

outputMLModule (hidden)

name: outputMLModule, type: MLBase

Parameter Fields

Field Index

actionClass: String Enable selection: Bool overflowMode: Enum
actionId: Integer Font: Enum ownsList: Bool
actionIndex: Integer Global Color: Color persistent: Bool
add: Trigger id: Integer pickCulling: Enum
Add on click: Bool index: Integer posC: Float
applySelect: Bool insert: Trigger posT: Float
Background: Color Length: Float posU: Float
boundingBoxCaching: Enum Line Style: Enum posXYZ: Vector3
clear: Trigger listString: String renderCaching: Enum
Color: Color listStringEnable: Bool renderCulling: Enum
Color Mode (colorMode): Enum Marker Type: Integer Scale: Float
Color Mode (textColorMode): Enum maxSize: Integer Shadow: Bool
copyItemToTemplate: Trigger Mode: Enum Text Background Alpha: Float
copyTemplateToItem: Trigger name: String type: Integer
currentIndex: Integer newName: String update: Trigger
delete: Trigger newPosC: Float upToDate: Bool
Delete All Markers: Trigger newPosT: Float useInsertTemplate: Bool
Delete on click: Bool newPosU: Float validStylePalette: Bool
Draw markers: Bool newPosXYZ: Vector3 Vector Draw Mode: Enum
Draw Mode: Enum newType: Integer Vector edit mode: Bool
Edit 3D: Bool newVecXYZ: Vector3 vecXYZ: Vector3
Edit 3D vector: Bool Num Markers Threshold For Fast Rendering: Integer  
Enable editing: Bool numItems: Integer  

Visible Fields

Scale

name: scaleSize, type: Float, default: 1, minimum: 0, maximum: 10

Sets an overall scale factor for each marker.

Length

name: scaleLength, type: Float, default: 1, minimum: 0, maximum: 100

Sets an overall scale factor for the vectors' lengths.

Global Color

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

Sets a global color if no StylePalette is used.

Vector edit mode

name: enableVector, type: Bool, default: FALSE

If checked, vector markers can be edited.

Click onto a 3D surface to place the first markers and without releasing the mouse button, drag on the surface to define the marker vector's end point.

Draw markers

name: drawingOn, type: Bool, default: TRUE

If checked, the markers are rendered in 3D.

Enable editing

name: editingOn, type: Bool, default: TRUE

If checked, editing is possible.

Enable selection

name: selectingOn, type: Bool, default: TRUE

If checked, the clicking on a set marker selects it.

Delete on click

name: deleteOnClick, type: Bool, default: FALSE

If checked, the clicked marker is being deleted on click.

Add on click

name: addOnClick, type: Bool, default: TRUE

If checked, a new marker is added on clicking on a 3D surface.

Edit 3D

name: edit3DOn, type: Bool, default: FALSE

If checked, the markers offer handles to freely position them in 3D.

Otherwise, a marker can only be placed and moved along a 3D surface.

Edit 3D vector

name: edit3DVector, type: Bool, default: FALSE

If checked, the vector portion of a marker can be edited in 3D.

Color Mode (colorMode)

name: colorMode, type: Enum, default: COLOR_BY_TYPE

Defines the color lookup into the StylePalette.

Values:

Title Name Description
Index COLOR_BY_INDEX The index of the marker is used as a lookup.
Type COLOR_BY_TYPE The type of the marker is used as a lookup.
Id COLOR_BY_ID The id of the marker is used as a lookup.

Marker Type

name: markerType, type: Integer, default: 0

Sets the type of the next generated marker.

Color Mode (textColorMode)

name: textColorMode, type: Enum, default: COLOR_TEXT

Defines the mode of the text color.

Values:

Title Name Description
Like Marker COLOR_LIKE_MARKER The text has the same color as the marker itself.
Text COLOR_TEXT The text has the color set in Color.

Mode

name: textMode, type: Enum, default: TEXT_OFF

Defines which information is displayed as a text besides a marker.

Values:

Title Name Description
Off TEXT_OFF No text is displayed.
Styleindex TEXT_STYLEINDEX The index into the StylePalette is displayed.
Stylename TEXT_STYLENAME The name of the used style of the StylePalette is displayed.
Itemname TEXT_ITEMNAME The name associated with the marker is displayed.
Itemid TEXT_ITEMID The id of the marker is displayed.
Voxelpos TEXT_VOXELPOS The voxel position is displayed.
Worldpos TEXT_WORLDPOS The world position is displayed.
Length TEXT_LENGTH The length of a vector is displayed.
Markertype TEXT_MARKERTYPE The type of the marker is displayed.
Markerlistindex TEXT_MARKERLISTINDEX The index of the marker is displayed.

Color

name: textColor, type: Color, default: 1 1 1

Sets the color of the text.

Shadow

name: textShadow, type: Bool, default: TRUE

If checked, a shadow is rendered behind the text to enhance readability.

Background

name: textBackgroundColor, type: Color, default: 0.5 0.5 0.5

Sets the color of the label in the background of the text.

Text Background Alpha

name: textBackgroundAlpha, type: Float, default: 0.30000001, minimum: 0, maximum: 1

Sets the alpha value of the label in the background of the text.

Font

name: textFontType, type: Enum, default: SoExtText2::HELVETICA_10

Defines the font size and style of the text.

Values:

Title Name
Text2::HELVETICA 10 SoExtText2::HELVETICA_10
Text2::HELVETICA 12 SoExtText2::HELVETICA_12
Text2::HELVETICA 18 SoExtText2::HELVETICA_18
Text2::TIMES ROMAN 24 SoExtText2::TIMES_ROMAN_24

Vector Draw Mode

name: vectorArrow, type: Enum, default: VECTOR_NO_ARROWS

Defines the style of the vectors.

Values:

Title Name
Vector No Arrows VECTOR_NO_ARROWS
Vector End Arrow VECTOR_END_ARROW
Vector Start Arrow VECTOR_START_ARROW
Vector Both Arrows VECTOR_BOTH_ARROWS
Vector Plus Minus VECTOR_PLUS_MINUS
Vector Pm With Arr VECTOR_PM_WITH_ARR
Box Start To End BOX_START_TO_END
Box Plus Minus BOX_PLUS_MINUS
Vector And Sphere VECTOR_AND_SPHERE
Vector And Disc VECTOR_AND_DISC
No Vector NO_VECTOR

Line Style

name: lineStyle, type: Enum, default: Solid

Defines the line style of the vectors.

Values:

Title Name
None None
Solid Solid
Dashed Dashed
Dotted Dotted

Draw Mode

name: drawMode, type: Enum, default: DrawModeCorrect

Defines the overall drawing mode.

Values:

Title Name Description
Fast DrawModeFast The markers are rendered as OpenGL points. This is very fast, especially for a large number of markers but style information will get lost.
Correct DrawModeCorrect The markers are rendered as simple Open Inventor scenes. This can produce many polygons, slowing down the rendering but all style information is used for the rendering.

Num Markers Threshold For Fast Rendering

name: numMarkersThresholdForFastRendering, type: Integer, default: 5000

Sets a threshold for the number of markers for deciding the draw mode.

If the field's value is negative, no automatic adjustment to the draw mode is made.

Otherwise, if the number of markers exceed the threshold value, the module switched automatically from CORRECT mode to FAST mode.

Delete All Markers

name: deleteAll, type: Trigger

If pressed, all stored markers are being deleted.

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

validStylePalette

name: validStylePalette, type: Bool, default: FALSE

listString

name: listString, type: String

numItems

name: numItems, type: Integer, default: 0

index

name: index, type: Integer, default: 0

persistent

name: persistent, type: Bool, default: FALSE

listStringEnable

name: listStringEnable, type: Bool, default: FALSE

ownsList

name: ownsList, type: Bool, default: TRUE

applySelect

name: applySelect, type: Bool, default: FALSE

id

name: id, type: Integer, default: -1

name

name: name, type: String

newName

name: newName, type: String

actionClass

name: actionClass, type: String, default: New

actionIndex

name: actionIndex, type: Integer, default: -1

actionId

name: actionId, type: Integer, default: -1

currentIndex

name: currentIndex, type: Integer, default: -1

overflowMode

name: overflowMode, type: Enum, default: None

Values:

Title Name
None None
Remove First RemoveFirst
Remove Last RemoveLast
Remove All RemoveAll
Remove New RemoveNew

maxSize

name: maxSize, type: Integer, default: 0

delete

name: delete, type: Trigger

insert

name: insert, type: Trigger

add

name: add, type: Trigger

update

name: update, type: Trigger

useInsertTemplate

name: useInsertTemplate, type: Bool, default: FALSE

copyItemToTemplate

name: copyItemToTemplate, type: Trigger

copyTemplateToItem

name: copyTemplateToItem, type: Trigger

clear

name: clear, type: Trigger

upToDate

name: upToDate, type: Bool, default: TRUE

posXYZ

name: posXYZ, type: Vector3, default: 0 0 0

posC

name: posC, type: Float, default: 0

posT

name: posT, type: Float, default: 0

posU

name: posU, type: Float, default: 0

vecXYZ

name: vecXYZ, type: Vector3, default: 0 0 0

type

name: type, type: Integer, default: 0

newPosXYZ

name: newPosXYZ, type: Vector3, default: 0 0 0

newPosC

name: newPosC, type: Float, default: 0

newPosT

name: newPosT, type: Float, default: 0

newPosU

name: newPosU, type: Float, default: 0

newVecXYZ

name: newVecXYZ, type: Vector3, default: 0 0 0

newType

name: newType, type: Integer, default: 0