Click or drag to resize
SoHandleEventAction Class

Allows nodes in a graph to receive input events.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.ActionsSoAction
      OIV.Inventor.ActionsSoHandleEventAction

Namespace: OIV.Inventor.Actions
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 10.12.3.0 (10.12.3.0)
Syntax
public class SoHandleEventAction : SoAction

The SoHandleEventAction type exposes the following members.

Constructors
  NameDescription
Public methodSoHandleEventAction

Constructor takes viewport region to use; this is needed to perform a pick operation when requested.

Top
Methods
  NameDescription
Public methodApply(SoNode)

Initiates an action on the graph defined by a node.

(Inherited from SoAction.)
Public methodApply(SoPath)

Initiates an action on the graph defined by a path.

(Inherited from SoAction.)
Public methodApply(SoPathList)
Calls Apply(pathList, false).
(Inherited from SoAction.)
Public methodApply(SoPathList, Boolean)

Initiates an action on the graph defined by a list of paths.

(Inherited from SoAction.)
Public methodClearApplyResult

When applied, an action may reference nodes or create objects (e.g.

(Overrides SoActionClearApplyResult.)
Public methodStatic memberEnableElement
Public methodEnableElements

(Overrides SoActionEnableElements.)
Public methodEnableRadiusForTriangles

Enable pick radius for triangle-based shapes.

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

Traverse a node that is not part of the current scenegraph.

(Inherited from SoAction.)
Public methodForwardTraversal(SoPath)

Traverse a path that is not part of the current scenegraph.

(Inherited from SoAction.)
Public methodGetContinueActionInBranchFlag

This function indicates if the action must stop in the current branch.

(Inherited from SoAction.)
Public methodGetCurPath

Returns the path accumulated during traversal, i.e., the chain of nodes from the root of the traversed graph to the current node being traversed.

(Inherited from SoAction.)
Public methodGetDistribMode

Returns the distribution mode of this action across a cluster (ScaleViz-Cluster only).

(Inherited from SoAction.)
Public methodGetEvent

Returns the event being handled.

Public methodGetGrabber

Returns the node that is currently grabbing events, or NULL if there is none.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetNodeAppliedTo

Returns the node the action is being applied to.

(Inherited from SoAction.)
Public methodGetOriginalPathListAppliedTo

Returns the original path list the action is being applied to.

(Inherited from SoAction.)
Public methodGetPathAppliedTo

Returns the path the action is being applied to.

(Inherited from SoAction.)
Public methodGetPathCode

Returns path code based on where current node (the node at the end of the current path) lies with respect to the path(s) the action is being applied to.

(Inherited from SoAction.)
Public methodGetPathListAppliedTo

Returns the path list the action is being applied to.

(Inherited from SoAction.)
Public methodGetPickedPoint

Returns the frontmost object hit (as an OIV.Inventor.SoPickedPoint) by performing a pick based on the mouse location specified in the event for which the action is being applied.

Public methodGetPickedPointList

Returns a list of objects intersected by a picking operation, sorted from nearest to farthest.

Public methodGetPickRadius

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

Public methodGetPickRoot

Returns the root node used for initiating a pick action for those nodes that want to know what is under the cursor.

Public methodGetPipeId

Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.

(Inherited from SoAction.)
Public methodGetSceneManager

Return the OIV.Inventor.SoSceneManager associated with this action.

(Inherited from SoAction.)
Public methodGetState

Gets the state from the action.

(Inherited from SoAction.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetViewportRegion

Returns current viewport region to use for action.

Public methodGetWhatAppliedTo

Returns code indicating what action is being applied to.

(Inherited from SoAction.)
Public methodHasTerminated

Returns true if the traversal has reached a termination condition.

(Inherited from SoAction.)
Public methodInvalidateState

Invalidates the current traversal state in the action, forcing it to be recreated when the action is next applied.

(Inherited from SoAction.)
Public methodIsBeingApplied

Returns true if this action is currently being applied.

(Inherited from SoAction.)
Public methodIsHandled

Returns whether any node has yet handled the event.

Public methodIsLastPathListAppliedTo

Returns true if the current list is the last one from the original.

(Inherited from SoAction.)
Public methodIsUsingAlternateRep

Returns true if current action is using alternate representations.

(Inherited from SoAction.)
Public methodPostDelayedTraversal

Method called by SoMultiPassManager after delayed pass traversals.

(Inherited from SoAction.)
Public methodPreDelayedTraversal

Method called by SoMultiPassManager before delayed pass traversals.

(Inherited from SoAction.)
Public methodReleaseGrabber

Releases the grab.

Public methodResetContinueActionInBranchFlag

This function resets the continue action flag.

(Inherited from SoAction.)
Public methodSetEvent

Sets the event being handled.

Public methodSetGrabber

Initiates grabbing of future events.

Public methodSetHandled

Sets whether any node has yet handled the event.

Public methodSetPickedPoint
Calls SetPickedPoint((OIV.Inventor.SoPickedPoint ^)nullptr).
Public methodSetPickedPoint(SoPickedPoint)

Set the OIV.Inventor.SoPickedPoint object that will be returned by getPickedPoint.

Public methodSetPickRadius

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

Public methodSetPickRoot

Sets the root node used for initiating a pick action for those nodes that want to know what is under the cursor.

Public methodSetPipeId

Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.

(Inherited from SoAction.)
Public methodSetSceneManager

Set the scene manager associated with this action (if any ).

(Inherited from SoAction.)
Public methodSetUpState

Creates state if it is NULL or it is no longer valid because new elements have been enabled since it was created.

(Inherited from SoAction.)
Public methodSetViewportRegion

Sets current viewport region to use for action.

Public methodStopActionInBranch

This function stops the action in the current Scene Graph branch.

(Inherited from SoAction.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTraverse

Does traversal of a graph rooted by a node.

(Inherited from SoAction.)
Public methodUseAlternateRep

Tell the action to use alternate representations during traversal when available.

(Inherited from SoAction.)
Top
Remarks

This class is used to allow nodes in a scene graph to handle input events. It is usually invoked from a component derived from OIV.Inventor.Win.SoWinRenderArea when the component receives a window system event. OIV.Inventor.SoSceneManager automatically creates a handle event action and provides a convenience method processEvent() to pass events to its managed scene graph. The Open Inventor viewer classes use this method to pass events to the scene graph in selection mode.

A node can get the event currently being handled by calling OIV.Inventor.Actions.SoHandleEventAction.GetEvent().

Manipulator, dragger and selection nodes respond to and process events. Most group nodes just pass the event to their children, while most other nodes simply ignore the action entirely. The OIV.Inventor.Nodes.SoEventCallback node invokes a callback / delegate method when traversed by a handle event action processing a specific type of event. This is the primary mechanism for handling event input in Open Inventor. Once a node has indicated to the action that it has handled the event, traversal stops.

A node that handles an event can also grab future events. Once it has done so, all events will be sent directly to that node, with no traversal taking place, until the node releases the grab. Draggers use this mechanism to ensure that they see the "finish" (e.g. mouse button up) event for their interaction.

Picking

A node can conveniently find out what, if any, geometry is under the cursor by calling the OIV.Inventor.Actions.SoHandleEventAction.GetPickedPoint() method. Applications can do this in the callback function assigned to an OIV.Inventor.Nodes.SoEventCallback node. The first time this method is called during a handle event traversal, the handle event action will automatically apply its internal OIV.Inventor.Actions.SoRayPickAction to the scene graph returned by OIV.Inventor.Actions.SoHandleEventAction.GetPickRoot(). The result is stored in case other nodes make the same query during the same traversal. The stored result can be cleared by calling OIV.Inventor.Actions.SoHandleEventAction.ClearApplyResult().

Some, but not all, options can be modified on the internal pick action (see for example OIV.Inventor.Actions.SoHandleEventAction.SetPickRadius(System.Single)). Note that the internal pick action does not compute texture coordinates or normal vector for the picked point. Thus, OIV.Inventor.Actions.SoHandleEventAction.GetPickedPoint().getNormal() returns (0,0,0) and OIV.Inventor.Actions.SoHandleEventAction.GetPickedPoint().getTextureCoords() returns (0,0,0,0).

If a node needs to apply the pick action itself, for example to set different options, it can get the appropriate root node by calling OIV.Inventor.Actions.SoHandleEventAction.GetPickRoot().

To use GPU picking on compatible shapes, it is mandatory to set the pick radius to 0, see OIV.Inventor.Actions.SoHandleEventAction.SetPickRadius(System.Single). Compatible shapes are described in the OIV.Inventor.Actions.SoRayPickAction section Picking Algorithms.

Sets: OIV.Inventor.Elements.SoViewportRegionElement

See Also