Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoLineHighlightRenderAction Class Reference

A wireframe highlight style. More...

#include <Inventor/actions/SoLineHighlightRenderAction.h>

+ Inheritance diagram for SoLineHighlightRenderAction:

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoLineHighlightRenderAction ()
 Constructor.
 
 SoLineHighlightRenderAction (const SbViewportRegion &viewportRegion)
 Constructor which takes the normal SoGLRenderAction parameters.
 
void setColor (const SbColor &c)
 Sets the color of the highlight.
 
const SbColorgetColor ()
 Gets the color of the highlight.
 
void setLinePattern (unsigned short pattern)
 Sets the line pattern of the highlight.
 
unsigned short getLinePattern ()
 Gets the line pattern of the highlight.
 
void setLineWidth (float width)
 Sets the line width of the highlight.
 
float getLineWidth ()
 Gets the line width of the highlight.
 
void setPointSize (float size)
 Sets the size of points (diameter in pixels) rendered by the highlight.
 
float getPointSize ()
 Gets the point size of the highlight.
 
- Public Member Functions inherited from SoHighlightRenderAction
virtual void clearApplyResult ()
 When applied, an action may reference nodes or create objects (e.g.
 
virtual void apply (SoNode *node)
 This renders the passed scene graph, and also renders highlighted selected objects as specified by the first SoSelection node found in the scene graph.
 
void setVisible (SbBool b)
 This provides a convenient mechanism for turning highlights off or on.
 
SbBool isVisible () const
 Returns whether highlights will be rendered or not.
 
- Public Member Functions inherited from SoGLRenderAction
 SoGLRenderAction (const SbViewportRegion &viewportRegion)
 Constructor.
 
void setViewportRegion (const SbViewportRegion &newRegion)
 Changes viewport region to use for rendering.
 
const SbViewportRegiongetViewportRegion () const
 Returns viewport region to use for rendering.
 
void setLogicalViewportRegion (const SbViewportRegion &newLogicalRegion)
 Sets current logical viewport region to use for rendering.
 
const SbViewportRegiongetLogicalViewportRegion () const
 Returns current logical viewport region.
 
void setUpdateArea (const SbVec2f &origin, const SbVec2f &size)
 Sets the current update area, which is the rectangular area of the viewport region that will actually be rendered into.
 
void getUpdateArea (SbVec2f &origin, SbVec2f &size) const
 Returns the current update area.
 
void setAbortCallback (SoGLRenderAbortCB *func, void *userData)
 Sets callback to call during rendering to test for an abort condition.
 
void setTransparencyType (TransparencyType type)
 Sets global transparency algorithm to use when rendering.
 
TransparencyType getTransparencyType () const
 Returns transparency quality level to use when rendering.
 
void setFastEditSavePolicy (FastEditSavePolicy policy, SbBool fastEditDelayedObjects=FALSE)
 Sets fast editing save policy to use when rendering.
 
FastEditSavePolicy getFastEditSavePolicy () const
 Returns fast editing save policy used when rendering.
 
SoDEPRECATED void setSmoothing (SbBool smooth)
 Sets smoothing flag.
 
SoDEPRECATED SbBool isSmoothing () const
 Returns smoothing flag.
 
void setNumPasses (int num)
 Sets number of rendering passes for multipass antialiasing.
 
int getNumPasses () const
 Gets number of rendering passes for multipass rendering.
 
void setPassUpdate (SbBool flag)
 Sets a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement (default is FALSE).
 
SbBool isPassUpdate () const
 Returns a flag indicating whether intermediate results are displayed after each antialiasing pass for progressive improvement.
 
void setPassCallback (SoGLRenderPassCB *func, void *userData)
 Sets a callback function to invoke between passes when antialiasing.
 
void setCacheContext (uint32_t context)
 Sets the OpenGL cache context.
 
uint32_t getCacheContext () const
 Returns the OpenGL cache context id for this action.
 
void setSortedLayersNumPasses (int num)
 Sets the number of rendering passes used when transparency type is SORTED_PIXEL.
 
int getSortedLayersNumPasses () const
 Returns the number of rendering passes used when transparency type is SORTED_PIXEL.
 
void setAlphaTest (SbBool flag)
 Enable or disable the OpenGL alpha test for rendering.
 
SbBool isAlphaTest () const
 Returns whether the OpenGL alpha test is enabled for rendering.
 
void setRenderingIsRemote (SbBool flag)
 Sets whether or not "remote" rendering is done.
 
SbBool getRenderingIsRemote () const
 Returns TRUE if remote rendering is being done.
 
virtual void invalidateState ()
 Invalidate the state, forcing it to be recreated at the next apply.
 
void setDecimationValue (SoDecimationTypeElement::Type type, float percentage=1.0)
 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.
 
SoDecimationTypeElement::Type getDecimationType ()
 Gets decimation type.
 
float getDecimationPercentage ()
 Gets decimation percentage, the value should be a number between 0.0 and 1.0.
 
void setInvalidateCacheMode (InvalidateCacheMode icm)
 Enables or disables the invalidation of render caches.
 
InvalidateCacheMode getInvalidateCacheMode ()
 Returns the current cache invalidation mode.
 
uint32_t getFrameCounter () const
 Returns the current frame counter.
 
void resetFrameCounter (uint32_t count=0)
 Reset the frame counter.
 
virtual void apply (SoPath *path)
 Initiates an action on the graph defined by a path.
 
virtual void apply (const SoPathList &pathList, SbBool obeysRules=FALSE)
 Initiates an action on the graph defined by a list of paths.
 
void shouldAutoCache (AutoCacheMode mode)
 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):
 
- Public Member Functions inherited from SoAction
virtual ~SoAction ()
 Destructor.
 
void stopActionInBranch ()
 This function stops the action in the current Scene Graph branch.
 
SbBool getContinueActionInBranchFlag () const
 This function indicates if the action must stop in the current branch.
 
void resetContinueActionInBranchFlag ()
 This function resets the continue action flag.
 
void useAlternateRep (const SbBool enable)
 Tell the action to use alternate representations during traversal when available.
 
SbBool isUsingAlternateRep () const
 Returns TRUE if current action is using alternate representations.
 
void setSceneManager (SoSceneManager *mgr)
 Set the scene manager associated with this action (if any ).
 
SoSceneManagergetSceneManager () const
 Return the SoSceneManager associated with this action.
 
virtual void forwardTraversal (SoNode *node)
 Traverse a node that is not part of the current scenegraph.
 
virtual void forwardTraversal (SoPath *path)
 Traverse a path that is not part of the current scenegraph.
 
DistribMode getDistribMode () const
 Returns the distribution mode of this action across a cluster (ScaleViz-Cluster only).
 
AppliedCode getWhatAppliedTo () const
 Returns code indicating what action is being applied to.
 
SoNodegetNodeAppliedTo () const
 Returns the node the action is being applied to.
 
SoPathgetPathAppliedTo () const
 Returns the path the action is being applied to.
 
const SoPathListgetPathListAppliedTo () const
 Returns the path list the action is being applied to.
 
const SoPathListgetOriginalPathListAppliedTo () const
 Returns the original path list the action is being applied to.
 
SbBool isLastPathListAppliedTo () const
 Returns TRUE if the current list is the last one from the original.
 
PathCode getPathCode (int &numIndices, const int *&indices)
 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.
 
PathCode getPathCodeMI (int &numIndices, const int *&indices, const int *&instanceIndices)
 Extender API: available to programmers who wish to extend the toolkit
 
void traverse (SoNode *node)
 Does traversal of a graph rooted by a node.
 
SbBool hasTerminated () const
 Returns TRUE if the traversal has reached a termination condition.
 
const SoPathgetCurPath ()
 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.
 
SoStategetState () const
 Gets the state from the action.
 
void setPipeId (int id)
 Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.
 
int getPipeId () const
 Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.
 
bool isBeingApplied ()
 Returns TRUE if this action is currently being applied.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoHighlightRenderAction
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoGLRenderAction
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static uint32_t generateCacheContext ()
 Generates and returns a new cache context id.
 
static bool isUsedCacheContext (uint32_t context)
 Returns TRUE if the specified cache context id is currently used by any SoGLRenderAction.
 
static SbBool isSortedLayersSupported (SoState *state=NULL)
 Indicates if SORTED_PIXEL transparency is supported by your graphics board on the current context.
 
- Static Public Member Functions inherited from SoAction
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static void nullAction (SoAction *, SoNode *)
 Null action method that can be stored in lookup table when desired.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Additional Inherited Members

- Public Types inherited from SoGLRenderAction
enum  TransparencyType {
  NO_TRANSPARENCY ,
  NO_SORT ,
  OPAQUE_FIRST ,
  SORTED_OBJECT ,
  SORTED_PIXEL
}
 Transparency rendering algorithm. More...
 
enum  FastEditSavePolicy {
  DISABLE ,
  EACH_FRAME ,
  WHEN_NEEDED
}
 Fast edit traversal types. More...
 
enum  AbortCode {
  CONTINUE ,
  ABORT ,
  PRUNE ,
  DELAY
}
 Possible return codes from a render abort callback. More...
 
enum  InvalidateCacheMode {
  OFF ,
  ONCE ,
  ALWAYS
}
 Invalidate cache mode. More...
 
enum  AutoCacheMode {
  DO_AUTO_CACHE = 1 ,
  DONT_AUTO_CACHE = 2
}
 Two bits are stored. More...
 
typedef AbortCode SoGLRenderAbortCB(void *userData)
 Callback functions for render abort should be of this type.
 
- Public Types inherited from SoAction
enum  DistribMode {
  LOCAL_ONLY ,
  CLUSTER_ONLY ,
  ALL
}
 This is used to define the way an action is distributed across a cluster. More...
 
enum  AppliedCode {
  NODE ,
  PATH ,
  PATH_LIST
}
 This enum is used to determine what the action is being applied to. More...
 
enum  PathCode {
  NO_PATH ,
  IN_PATH ,
  BELOW_PATH ,
  OFF_PATH
}
 This enum may be used during traversal of nodes to indicate where the node is with respect to the path being traversed. More...
 

Detailed Description

A wireframe highlight style.

SoLineHighlightRenderAction is a render action which renders the specified scene graph, then renders each selected object again in wireframe. If there is no renderable geometry in a selected object, no highlight is rendered for that object.

Selected objects are specified by the first selection node (SoSelection or 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 SoGLRenderAction in the SoSceneManager class using the setGLRenderAction() method. The viewer classes provide a convenience setGLRenderAction() method that calls SoSceneManager (see e.g. 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.

Other highlight effects are available including "halo" highlighting.

EXAMPLE

SEE ALSO

SoBoxHighlightRenderAction, SoColorHighlightRenderAction, SoHaloHighlightRenderAction, SoHighlightRenderAction, SoGLRenderAction, SoSelection, SoWinRenderArea

Definition at line 172 of file SoLineHighlightRenderAction.h.

Constructor & Destructor Documentation

◆ SoLineHighlightRenderAction() [1/2]

SoLineHighlightRenderAction::SoLineHighlightRenderAction ( )

Constructor.

◆ SoLineHighlightRenderAction() [2/2]

SoLineHighlightRenderAction::SoLineHighlightRenderAction ( const SbViewportRegion viewportRegion)

Constructor which takes the normal SoGLRenderAction parameters.

Member Function Documentation

◆ getClassTypeId()

static SoType SoLineHighlightRenderAction::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getColor()

const SbColor & SoLineHighlightRenderAction::getColor ( )

Gets the color of the highlight.

◆ getLinePattern()

unsigned short SoLineHighlightRenderAction::getLinePattern ( )

Gets the line pattern of the highlight.

◆ getLineWidth()

float SoLineHighlightRenderAction::getLineWidth ( )

Gets the line width of the highlight.

◆ getPointSize()

float SoLineHighlightRenderAction::getPointSize ( )

Gets the point size of the highlight.

◆ getTypeId()

virtual SoType SoLineHighlightRenderAction::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoHighlightRenderAction.

◆ setColor()

void SoLineHighlightRenderAction::setColor ( const SbColor c)

Sets the color of the highlight.

Default is red (1,0,0). The application is responsible for forcing a redraw of the scene to see the effects of this change.

◆ setLinePattern()

void SoLineHighlightRenderAction::setLinePattern ( unsigned short  pattern)

Sets the line pattern of the highlight.

Default is solid, 0xffff. The pattern of bits in the passed variable specifies the pattern of the line. See SoDrawStyle for more information. The application is responsible for forcing a redraw of the scene to see the effects of this change.

◆ setLineWidth()

void SoLineHighlightRenderAction::setLineWidth ( float  width)

Sets the line width of the highlight.

Default is 3. The application is responsible for forcing a redraw of the scene to see the effects of this change.

◆ setPointSize()

void SoLineHighlightRenderAction::setPointSize ( float  size)

Sets the size of points (diameter in pixels) rendered by the highlight.

Default is 1. Value must be greater than zero. Only applies to point primitives, e.g. SoPointSet.


The documentation for this class was generated from the following file: