SoHaloHighlightRenderAction Class |
A halo highlight style.
Namespace: OIV.Inventor.Actions
The SoHaloHighlightRenderAction type exposes the following members.
Name | Description | |
---|---|---|
SoHaloHighlightRenderAction | Initializes a new instance of the SoHaloHighlightRenderAction class | |
SoHaloHighlightRenderAction(SbViewportRegion) | Initializes a new instance of the SoHaloHighlightRenderAction class |
Name | Description | |
---|---|---|
AbortNow | (Inherited from SoGLRenderAction.) | |
Apply(SoNode) | This renders the passed scene graph, and also renders highlighted selected objects as specified by the first OIV.Inventor.Nodes.SoSelection node found in the scene graph. | |
Apply(SoPath) | Initiates an action on the graph defined by a path. | |
Apply(SoPathList) | Calls Apply(pathList, false). (Inherited from SoGLRenderAction.) | |
Apply(SoPathList, Boolean) | Initiates an action on the graph defined by a list of paths. | |
ClearApplyResult | When applied, an action may reference nodes or create objects (e.g. | |
EnableDepthPeeling3D | Use 3D texturing instead of 2D for the fixed functionality emulation in depth peeling. | |
EnableElement | ||
EnableElements | (Overrides SoHighlightRenderActionEnableElements.) | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
ForwardTraversal(SoNode) | Traverse a node that is not part of the current scenegraph. | |
ForwardTraversal(SoPath) | Traverse a path that is not part of the current scenegraph. | |
GetCache | Returns the cache that has been set with OIV.Inventor.Actions.SoGLRenderAction.SetCache(OIV.Inventor.Caches.SoCache) | |
GetCacheContext | Returns the OpenGL cache context id for this action. | |
GetContinueActionInBranchFlag | This function indicates if the action must stop in the current branch. | |
GetCurPass | (Inherited from SoGLRenderAction.) | |
GetCurPath | 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. | |
GetDecimationPercentage | Gets decimation percentage, the value should be a number between 0.0 and 1.0. | |
GetDecimationType | Gets decimation type. | |
GetDelayedObjDepthWrite | Returns whether delayed transparent objects update the depth buffer. | |
GetDepthPeelingPass | Get the current pass of depth peeling, -1 if not doing depth peeling. | |
GetDistribMode | Returns the distribution mode of this action across a cluster (ScaleViz-Cluster only). | |
GetFastEditSavePolicy | Returns fast editing save policy used when rendering. | |
GetFrameCounter | Returns the current frame counter. | |
GetHaloColor | ||
GetHaloSmoothFactor | ||
GetHaloWidth | ||
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetInvalidateCacheMode | Returns the current cache invalidation mode. | |
GetLogicalViewportRegion | Returns current logical viewport region. | |
GetNodeAppliedTo | Returns the node the action is being applied to. | |
GetNumPasses | Gets number of rendering passes for multipass rendering. | |
GetOriginalPathListAppliedTo | Returns the original path list the action is being applied to. | |
GetPathAppliedTo | Returns the path the action is being applied to. | |
GetPathCode | 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. | |
GetPathListAppliedTo | Returns the path list the action is being applied to. | |
GetPipeId | Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration. | |
GetRenderingIsRemote | Returns true if remote rendering is being done. | |
GetSceneManager | Return the OIV.Inventor.SoSceneManager associated with this action. | |
GetSortedLayersNumPasses | Returns the number of rendering passes used when transparency type is OIV.Inventor.Actions.SoGLRenderAction.TransparencyTypes.SORTED_PIXEL. | |
GetState | Gets the state from the action. | |
GetTransparencyType | Returns transparency quality level to use when rendering. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUpdateArea | Returns the current update area. | |
GetViewportRegion | Returns viewport region to use for rendering. | |
GetWhatAppliedTo | Returns code indicating what action is being applied to. | |
HandleTransparency | Calls HandleTransparency(false, false). (Inherited from SoGLRenderAction.) | |
HandleTransparency(Boolean) | Calls HandleTransparency(isTransparent, false). (Inherited from SoGLRenderAction.) | |
HandleTransparency(Boolean, Boolean) | (Inherited from SoGLRenderAction.) | |
HasTerminated | Returns true if the traversal has reached a termination condition. | |
InvalidateState | Invalidate the state, forcing it to be recreated at the next apply. | |
IsAlphaTest | Returns whether the OpenGL alpha test is enabled for rendering. | |
IsBeingApplied | Returns true if this action is currently being applied. | |
IsDoingDepthPeeling | Return true if depth peeling is active. | |
IsHaloAlwaysVisible | ||
IsLastPathListAppliedTo | Returns true if the current list is the last one from the original. | |
IsPassUpdate | Returns a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement. | |
IsSmoothing | Obsolete. Returns smoothing flag. | |
IsUsingAlternateRep | Returns true if current action is using alternate representations. | |
IsVisible | Returns whether highlights will be rendered or not. | |
PostDelayedTraversal | Method called by SoMultiPassManager after delayed pass traversals. | |
PreDelayedTraversal | Method called by SoMultiPassManager before delayed pass traversals. | |
ResetContinueActionInBranchFlag | This function resets the continue action flag. | |
ResetFrameCounter | Calls ResetFrameCounter(System.UInt32(0)). (Inherited from SoGLRenderAction.) | |
ResetFrameCounter(UInt32) | Reset the frame counter. | |
SetAlphaTest | Enable or disable the OpenGL alpha test for rendering. | |
SetCache | Sets the main cache to use with this render action. | |
SetCacheContext | Sets the OpenGL cache context. | |
SetDecimationValue(SoDecimationTypeElementTypes) | Calls SetDecimationValue(type, 1.0). (Inherited from SoGLRenderAction.) | |
SetDecimationValue(SoDecimationTypeElementTypes, Single) | Sets decimation percentage, the value should be a number between 0.0 and 1.0 Useful for reducing the number of triangles rendered in the scene. | |
SetDelayedObjDepthWrite | Control whether delayed transparent objects update the depth buffer. | |
SetFastEditSavePolicy(SoGLRenderActionFastEditSavePolicies) | Calls SetFastEditSavePolicy(policy, false). (Inherited from SoGLRenderAction.) | |
SetFastEditSavePolicy(SoGLRenderActionFastEditSavePolicies, Boolean) | Sets fast editing save policy to use when rendering. | |
SetHaloAlwaysVisible | Defines whether or not the halo can be seen through objects that are placed in front of selected shapes. | |
SetHaloColor | Defines the color of the highlight. | |
SetHaloSmoothFactor | Defines the amount of alpha attenuation of the halo contour. | |
SetHaloWidth | Defines the width of the halo in pixels. | |
SetInvalidateCacheMode | Enables or disables the invalidation of render caches. | |
SetLogicalViewportRegion | Sets current logical viewport region to use for rendering. | |
SetNumPasses | Sets number of rendering passes for multipass antialiasing. | |
SetPassUpdate | Sets a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement (default is false). | |
SetPipeId | Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration. | |
SetRenderingIsRemote | Sets whether or not "remote" rendering is done. | |
SetSceneManager | Set the scene manager associated with this action (if any ). | |
SetSmoothing | Obsolete. Sets smoothing flag. | |
SetSortedLayersNumPasses | Sets the number of rendering passes used when transparency type is OIV.Inventor.Actions.SoGLRenderAction.TransparencyTypes.SORTED_PIXEL. | |
SetTransparencyType | Sets global transparency algorithm to use when rendering. | |
SetUpdateArea | Sets the current update area, which is the rectangular area of the viewport region that will actually be rendered into. | |
SetUpState | initialize the action state. | |
SetViewportRegion | Changes viewport region to use for rendering. | |
SetVisible | This provides a convenient mechanism for turning highlights off or on. | |
ShouldAutoCache | Called by nodes to say that they should/shouldn't be auto-cached (pass true if should, false if shouldn't, don't call this method at all if the node doesn't care): | |
StopActionInBranch | This function stops the action in the current Scene Graph branch. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Traverse | Does traversal of a graph rooted by a node. | |
UseAlternateRep | Tell the action to use alternate representations during traversal when available. |
Name | Description | |
---|---|---|
AbortCallback | Sets callback to call during rendering to test for an abort condition. | |
PassCallback | Sets a callback function to invoke between passes when antialiasing. |
OIV.Inventor.Actions.SoHaloHighlightRenderAction is a render action which renders the specified scene graph, then renders a "halo" highlight around each selected object. See the images below for examples of this highlight technique. Halo highlighting works with all kinds of shapes including VolumeViz and MeshVizXLM. However, if a selected object does not write to the depth buffer for any reason, it will not be highlighted.
Selected objects are specified by the first selection node (OIV.Inventor.Nodes.SoSelection or OIV.Inventor.Nodes.SoExtSelection) node in the scene to which this action is applied. If there is no selection node in the scene graph, then no objects will be highlighted.
The application must explicitly tell Open Inventor to use a highlight render action in place of the default OIV.Inventor.Actions.SoGLRenderAction in the OIV.Inventor.SoSceneManager class using the setGLRenderAction() method. The viewer classes provide a convenience setGLRenderAction() method that calls OIV.Inventor.SoSceneManager (see e.g. OIV.Inventor.Win.SoWinRenderArea).
For convenience, the viewer classes also provide the redrawOnSelectionChange() method. This method attaches a sensor to the specified selection node and automatically schedules a redraw if the set of selected objects is modified.
Here is an example of an OIV.Inventor.Nodes.SoAlgebraicCone highlighted with an OIV.Inventor.Actions.SoHaloHighlightRenderAction:
Here are parameters that can be adjusted:
The halo color: see OIV.Inventor.Actions.SoHaloHighlightRenderAction.SetHaloColor(OIV.Inventor.SbColor)
The halo width: see OIV.Inventor.Actions.SoHaloHighlightRenderAction.SetHaloWidth(System.Int32)
The halo attenuation factor: see OIV.Inventor.Actions.SoHaloHighlightRenderAction.SetHaloSmoothFactor(System.Single)
Whether or not the halo can be seen through scene objects: see OIV.Inventor.Actions.SoHaloHighlightRenderAction.SetHaloAlwaysVisible(System.Boolean)
NOTES
The rendering of the halo uses the depth buffer of the selected shapes as its boundary.
Increasing the halo width value decreases performance.
When multiple objects are selected, they are highlighted as one unique shape, i.e. the halo is done on the union of their depth buffer. This is illustrated on the following image:
2 selected objects are highlighted as one |
Here is an example of how a halo highlight can be specified for a particular selection node and render area:
SoSelection selectionNode = new SoSelection(); . . . SoWinExaminerViewer viewer = new SoWinExaminerViewer(); viewer.SetSceneGraph( selectionNode ); viewer.SetGLRenderAction( new SoHaloHighlightRenderAction() ); viewer.RedrawOnSelectionChange( selectionNode );