Click or drag to resize
SoExtSelection Class

Selection node that supports lasso selection.

Inheritance Hierarchy

Namespace: OIV.Inventor.Nodes
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax
public class SoExtSelection : SoSelection

The SoExtSelection type exposes the following members.

Constructors
  NameDescription
Public methodSoExtSelection

Constructor.

Top
Methods
  NameDescription
Public methodAddChild

Adds a child at the end of the list of children.

(Overrides SoGroupAddChild(SoNode).)
Public methodAffectsState

Returns true if a node has an effect on the state during traversal.

(Inherited from SoSeparator.)
Public methodAnimateOverlayLasso Obsolete.
Calls AnimateOverlayLasso(true).
Public methodAnimateOverlayLasso(Boolean) Obsolete.

Sets the the lasso animation flag.

Public methodCallback
(Inherited from SoSeparator.)
Public methodClearCacheList
(Inherited from SoSeparator.)
Public methodCopy
Calls Copy(false).
(Inherited from SoNode.)
Public methodCopy(Boolean)

Creates and returns an exact copy of the node.

(Inherited from SoNode.)
Public methodCopyFieldValues(SoFieldContainer)
Calls CopyFieldValues(fc, false).
(Inherited from SoFieldContainer.)
Public methodCopyFieldValues(SoFieldContainer, Boolean)

Copies the contents of fc's fields into this object's fields.

(Inherited from SoFieldContainer.)
Public methodDeselect(Int32)

Deselects a path by removing it from the selection list.

(Inherited from SoSelection.)
Public methodDeselect(SoNode)

Deselects the passed node by creating a path to it, and removing the node from the selection list by calling deselect(path) .

(Inherited from SoSelection.)
Public methodDeselect(SoPath)

Deselects the passed path by removing it from the selection list.

(Inherited from SoSelection.)
Public methodDeselectAll

Deselects all paths in the selection list, that is, clear the list.

(Inherited from SoSelection.)
Public methodDispose
Releases all resources used by SoDisposable.
(Inherited from SoDisposable.)
Public methodDistribute
(Inherited from SoNode.)
Public methodDoAction
(Inherited from SoSeparator.)
Public methodEnableNotify

Notification at this Field Container is enabled (if flag == true) or disabled (if flag == false).

(Inherited from SoFieldContainer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFieldsAreEqual

Returns true if this object's fields are exactly equal to fc's fields.

(Inherited from SoFieldContainer.)
Public methodFindChild

Finds index of given child within group.

(Inherited from SoGroup.)
Public methodGet

Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string.

(Inherited from SoFieldContainer.)
Public methodGetAllFields

Returns a list of fields, including the eventIn's and eventOut's.

(Inherited from SoFieldContainer.)
Public methodGetAlternateRep

This method is called by actions to allow the node to provide an "alternate representation" when appropriate (typically depending on the action type).

(Inherited from SoNode.)
Public methodGetBoundingBox
Public methodGetChild

Returns pointer the child node with the given index.

(Inherited from SoGroup.)
Public methodGetEventIn

Returns a the eventIn with the given name.

(Inherited from SoFieldContainer.)
Public methodGetEventOut

Returns the eventOut with the given name.

(Inherited from SoFieldContainer.)
Public methodGetField

Returns a the field of this object whose name is fieldName.

(Inherited from SoFieldContainer.)
Public methodGetFieldName

Returns the name of the given field in the fieldName argument.

(Inherited from SoFieldContainer.)
Public methodGetFields

Appends references to all of this object's fields to resultList, and returns the number of fields appended.

(Inherited from SoFieldContainer.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetLassoColor Obsolete.

Gets the lasso color.

Public methodGetLassoCoordsDC

Returns the lasso coordinates in device coordinates.

Public methodGetLassoCoordsWC

Returns the lasso coordinates in world coordinates.

Public methodGetLassoWidth Obsolete.

Gets the lasso line width.

Public methodGetList

Returns the list of selected paths.

(Inherited from SoSelection.)
Public methodGetMatrix
(Inherited from SoSeparator.)
Public methodGetName

Returns the name of an instance.

(Inherited from SoBase.)
Public methodGetNumChildren

Returns number of children.

(Inherited from SoGroup.)
Public methodGetNumSelected

Returns the number of paths in the selection list.

(Inherited from SoSelection.)
Public methodGetOverlayLassoColorIndex Obsolete.

Gets the lasso color index.

Public methodGetOverlayLassoPattern Obsolete.

Gets the lasso stipple pattern.

Public methodGetOverlaySceneGraph

Returns the scene graph that should be passed to the render area function setOverlaySceneGraph .

Public methodGetPath

Returns the ith path in the selection list.

(Inherited from SoSelection.)
Public methodGetPickRadius

Returns the radius (in pixels) around the viewport-space point through which the ray passes when doing ray picking.

(Inherited from SoSelection.)
Public methodGetPrimitiveCount
(Inherited from SoSeparator.)
Public methodGetRenderEngineMode

Returns the supported Render engine mode.

(Inherited from SoNode.)
Public methodGetRenderUnitID
(Inherited from SoNode.)
Public methodGetSelectionPathList

Returns paths list of selected objects.

Public methodGetSelectionSceneGraph

Returns the scenegraph displayed as "lasso" in fast edit mode.

Public methodGetStringName (Inherited from SoBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGLRender
Public methodGLRenderBelowPath
(Inherited from SoSeparator.)
Public methodGLRenderInPath
(Inherited from SoSeparator.)
Public methodGLRenderOffPath
(Inherited from SoSeparator.)
Public methodGrabEventsCleanup
(Inherited from SoNode.)
Public methodGrabEventsSetup
(Inherited from SoNode.)
Public methodHandleEvent
Public methodHasDefaultValues

Returns true if all of the object's fields have their default values.

(Inherited from SoFieldContainer.)
Public methodInsertChild

Adds a child so that it becomes the one with the given index.

(Inherited from SoGroup.)
Public methodIsBoundingBoxIgnoring

Used by BoundingBoxAction to known if bounding box computation should be ignored or not.

(Inherited from SoGroup.)
Public methodIsNotifyEnabled

Notification is the process of telling interested objects that this object has changed.

(Inherited from SoFieldContainer.)
Public methodIsOverlayLassoAnimated Obsolete.

Gets the the lasso animation flag.

Public methodIsOverride

Returns the state of the override flag.

(Inherited from SoNode.)
Public methodIsPickMatching

Returns pick matching flag.

(Inherited from SoSelection.)
Public methodIsSelected(SoNode)

Returns true if the passed node is selected by creating a path to it, then calling OIV.Inventor.Nodes.SoSelection.IsSelected(OIV.Inventor.SoPath).

(Inherited from SoSelection.)
Public methodIsSelected(SoPath)

Returns true if the passed path is selected, that is, if it is in the selection list.

(Inherited from SoSelection.)
Public methodIsSynchronizable

Gets the ScaleViz synchronizable state of this object.

(Inherited from SoBase.)
Public methodIsUsingFastEditing

Gets whether the lasso is drawn using fast editing.

Public methodPick
(Inherited from SoGroup.)
Public methodRayPick
(Inherited from SoSeparator.)
Public methodRemoveAllChildren

Removes all children from group.

(Inherited from SoGroup.)
Public methodRemoveChild(Int32)

Removes child with given index from group.

(Inherited from SoGroup.)
Public methodRemoveChild(SoNode)

Removes first instance of given child from group.

(Inherited from SoGroup.)
Public methodReplaceChild(Int32, SoNode)

Replaces child with given index with new child.

(Inherited from SoGroup.)
Public methodReplaceChild(SoNode, SoNode)

Replaces first instance of given child with new child.

(Inherited from SoGroup.)
Public methodSearch
Public methodSelect(SoNode)

Selects the passed node by creating a path to it, and adding the path to the selection list by calling select(path) .

(Inherited from SoSelection.)
Public methodSelect(SoPath)

Selects the passed path by adding it to the selection list.

(Inherited from SoSelection.)
Public methodSelect(SoNode, Int32, SbVec2f, SbViewportRegion, Boolean)
Public methodSet

Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format.

(Inherited from SoFieldContainer.)
Public methodSetLassoColor Obsolete.

Sets the lasso color.

Public methodSetLassoWidth Obsolete.

Sets the lasso line width.

Public methodSetName (Inherited from SoBase.)
Public methodSetOverlayLassoColorIndex Obsolete.

Sets the lasso color index.

Public methodSetOverlayLassoPattern Obsolete.

Sets the lasso stipple pattern.

Public methodSetOverride

Turns the override flag on or off.

(Inherited from SoNode.)
Public methodSetPickFilterCallback(SoSelectionPickCB)
Calls SetPickFilterCallback(f, true).
(Inherited from SoSelection.)
Public methodSetPickFilterCallback(SoSelectionPickCB, Boolean)

The pick filter callback is invoked when a pick has occurred and the selection node is about to change the selection list.

(Inherited from SoSelection.)
Public methodSetPickMatching

OIV.Inventor.Nodes.SoSelection will pick once on mouse down and once on mouse up, and make sure the picks match before changing the selection list.

(Inherited from SoSelection.)
Public methodSetPickRadius

Sets the radius (in pixels) around the viewport-space point through which the ray passes when doing ray picking.

(Inherited from SoSelection.)
Public methodSetSelectionSceneGraph

Sets the scenegraph to be displayed as "lasso" in fast edit mode.

Public methodSetSynchronizable

Sets this to be a ScaleViz synchronizable object.

(Inherited from SoBase.)
Public methodSetToDefaults

Sets all fields in this object to their default values.

(Inherited from SoFieldContainer.)
Public methodToggle(SoNode)

Toggles the selection status of the passed node by creating a path to it, then calling toggle(path) .

(Inherited from SoSelection.)
Public methodToggle(SoPath)

Toggles the selection status of the passed path - if the path is in the selection list, it is removed; if not in the list, it is added.

(Inherited from SoSelection.)
Public methodToString
Converts this SoBase structure to a human readable string.
(Inherited from SoBase.)
Public methodTouch

Marks an instance as modified, simulating a change to it.

(Inherited from SoNode.)
Public methodUseFastEditing
Calls UseFastEditing(true).
Public methodUseFastEditing(Boolean)

Sets whether the lasso should be drawn using fast editing.

Public methodWrite
(Inherited from SoGroup.)
Top
Properties
  NameDescription
Public propertyanimateLasso

Controls lasso animation.

Public propertyboundingBoxCaching
(Inherited from SoSeparator.)
Public propertyboundingBoxIgnoring

Whether to ignore this node during bounding box traversal.

(Inherited from SoGroup.)
Public propertyEndSelectionCallback

Sets the callback called when the mouse button is released in selection mode.

Public propertyfastEditing

Specifies the fast edit mode of the separator node.

(Inherited from SoSeparator.)
Public propertyIsDisposable
ISafeDisposable interface implementation.
(Inherited from SoDisposable.)
Public propertyItem

Returns the ith path in the selection list.

(Inherited from SoSelection.)
Public propertylassoColor

Color of lasso.

Public propertylassoMode

Specifies the lasso mode (whether ALL_SHAPES or only VISIBLE_SHAPES can be selected).

Public propertylassoPattern

Stipple pattern.

Public propertylassoPatternScaleFactor

Stipple pattern scale factor.

Public propertylassoPolicy

Specifies the lasso policy.

Public propertylassoType

Specifies lasso type (none, lasso, or rectangle).

Public propertylassoWidth

Width of lasso.

Public propertyLineSegmentFilterCallback

Sets the line segment filter callback.

Public propertyMovingSelectionCallback

Sets the callback called when the mouse is moved in selection mode.

Public propertypickCulling

Whether to cull during picking traversal.

(Inherited from SoSeparator.)
Public propertyPointFilterCallback

Sets the point filter callback.

Public propertypolicy

Selection policy that is followed in response to user interaction.

(Inherited from SoSelection.)
Public propertyrenderCaching Obsolete.

Whether to cache during rendering traversal.

(Inherited from SoSeparator.)
Public propertyrenderCulling

Whether to cull during rendering traversal.

(Inherited from SoSeparator.)
Public propertyrenderUnitId

Used during the ScaleViz depth compositing process, this field specifies which render unit (OIRU) will render the sub scene graph below this separator.

(Inherited from SoSeparator.)
Public propertyStartSelectionCallback

Sets the callback called when the mouse button is clicked in selection mode.

Public propertyTriangleFilterCallback

Sets the triangle filter delegate.

Public propertyUserData
Gets or sets the user data to be contained by the field container.
(Inherited from SoFieldContainer.)
Top
Events
  NameDescription
Public eventDeselection
(Inherited from SoSelection.)
Public eventFinishSelection
(Inherited from SoSelection.)
Public eventOnPreFilter

The ExtSelection will traverse each node of scene graph and test intersection against each nodes.

Public eventSelection
(Inherited from SoSelection.)
Public eventStartSelection
(Inherited from SoSelection.)
Top
Remarks

This class extends the functionality of OIV.Inventor.Nodes.SoSelection to allow the user to select an object or multiple objects by drawing a lasso around the object(s) to be selected. The lasso can be represented as a rectangle between the mouse up and down positions or as a set of lines that the user draws around the objects, depending on the field OIV.Inventor.Nodes.SoExtSelection.lassoType. When OIV.Inventor.Nodes.SoExtSelection.lassoType is NOLASSO, or when the lasso is empty (the screen coordinates of the button down and button up event are the same), OIV.Inventor.Nodes.SoExtSelection behaves exactly like its parent class OIV.Inventor.Nodes.SoSelection.

See OIV.Inventor.Nodes.SoSelection for more information about managing the selection list and automatically highlighting the selected shape(s).

Objects are selected if they are surrounded by the lasso or if the lasso intersects them, depending on the field OIV.Inventor.Nodes.SoExtSelection.lassoPolicy, as follows:

  • FULL_BBOX: lasso selects objects whose bounding box is completely contained by the lasso

  • PART_BBOX: lasso selects objects whose bounding box intersects the lasso (or is contained by the lasso)

  • FULL: lasso selects objects whose geometry is completely contained by the lasso

  • PART: lasso selects objects whose geometry intersects the lasso (or is contained by the lasso)

FULL and PART require more computation and are generally slower.

A lasso mode controls whether only visible shapes (front shapes) are selectable, by controlling the selection algorithm used, either geometry-based or pixel-based. A specific lasso mode may also be preferred for performance reasons depending on the scene.

Primitive details for selected parts of shapes can be obtained through dedicated callbacks that can be also used to filter the selection. These primitive filter callbacks can be called for each generated primitive.

When using OIV.Inventor.Nodes.SoExtSelection node, the delegateset by setPickFilterCallback will be called only once per selected shape. Only OIV.Inventor.SoPickedPoint.GetPath() makes sense for the picked point passed to the pick filter delegatein this case. Other OIV.Inventor.SoPickedPoint methods may return undefined results.

Lasso selection can be also be controlled programmatically, without requiring user interaction.

NOTE: Using the FastEdit mode:

FastEdit mode provides the advantages of overlay mode without the overlay hardware support requirement. See OIV.Inventor.Nodes.SoSeparator for more information about the fast editing feature. FastEdit mode can allow the lasso geometry to be redrawn at interactive rates even when the underlying scene takes a long time to redraw. On Windows platforms, it also avoids using GDI to draw the lasso, which conflicts with the "Aero" user interface mode on Windows Vista.

When the application uses fast editing it must call the function useFastEdit(true) first. If it doesn't call this function, operations which require fast edit will output a warning in debug mode.

FastEdit mode also provides some powerful additional features including the option to provide custom (and dynamic) lasso geometry (see the OIV.Inventor.Nodes.SoExtSelection.SetSelectionSceneGraph(OIV.Inventor.Nodes.SoNode) method) and the option to set callbacks on mouse events during selection (see the methods OIV.Inventor.Nodes.SoExtSelection.StartSelectionCallback, OIV.Inventor.Nodes.SoExtSelection.EndSelectionCallback, and OIV.Inventor.Nodes.SoExtSelection.MovingSelectionCallback). The geometry in the selection scene graph can be dynamically updated by the application as the user moves the cursor, using these callbacks. This can useful to display dynamic feedback without actually doing selection. For example to display a "rubber band" line while positioning annotations or measurements. However note that the selection scene graph is always traversed, not just when the user is selecting. It is the application's responsibility to empty the selection scene graph (or hide its contents using an OIV.Inventor.Nodes.SoSwitch) when appropriate.

Note: The geometry in the selection scene graph is not automatically used for selection. (It may not be appropriate.) However the application can use the OIV.Inventor.Nodes.SoExtSelection.Select(OIV.Inventor.Nodes.SoNode, System.Int32, OIV.Inventor.SbVec2f[], OIV.Inventor.SbViewportRegion, System.Boolean) method, if desired, to do a selection using any set of 2D points defining a "lasso".

Finally note that since Open Inventor 8.6, OIV.Inventor.Drawers.SoScreenDrawer and its specialized sub-classes provide a more general mechanism for interactively drawing polylines, rectangles, ellipses, etc in screen space.

Clipping: OIV.Inventor.Nodes.SoExtSelection avoids selecting shapes that are culled by active OIV.Inventor.Nodes.SoClipPlane in both the ALL_SHAPES and VISIBLE Lasso modes. The user can disable this, and restore the legacy behavior of OIV.Inventor.Nodes.SoExtSelection before Open Inventor 9.4.0, by setting the environment variable OIV_SELECTION_USE_CLIPPLANES to 0 (see OIV.Inventor.SoPreferences).

Instancing: When instance nodes of a OIV.Inventor.Nodes.SoMultipleInstance or a OIV.Inventor.Nodes.SoMultipleCopy group are selected, the application can get the instance identifier using the OIV.Inventor.SoPath method getInstanceIndex().

See OIV.Inventor.Nodes.SoSelection for additional information about the selection list and code example.

FILE FORMAT/DEFAULT

ExtSelection {
boundingBoxCaching AUTO
renderCulling AUTO
pickCulling AUTO
policy SHIFT
lassoType NOLASSO
lassoPolicy FULL_BBOX
lassoMode ALL_SHAPES
fastEditing DISABLE
}

See Also