Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoColorHighlightRenderAction Class Reference

A polygon selection highlight style. More...

#include <Inventor/actions/SoColorHighlightRenderAction.h>

+ Inheritance diagram for SoColorHighlightRenderAction:

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoColorHighlightRenderAction ()
 
 SoColorHighlightRenderAction (const SbViewportRegion &viewportRegion)
 
virtual ~SoColorHighlightRenderAction ()
 
void setColor (const SbColor &c)
 Sets the color of the highlight.
 
const SbColorgetColor () const
 Gets the color 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 void initClass ()
 
static void exitClass ()
 
- 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 void SoGLRenderPassCB(void *userData)
 Callback functions used between rendering passes should be of this type.
 
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 polygon selection highlight style.

SoColorHighlightRenderAction is a render action which renders the scene graph and then renders again the polygons of selected objects in a highlight color.Selected objects are specified by the first SoSelection node in the scene to which this action is applied. A highlight render action can be passed to the setGLRenderAction() method of render area and viewer classes to have an effect on scene graphs.

EXAMPLE

SEE ALSO

SoLineHighlightRenderAction, SoBoxHighlightRenderAction, SoHaloHighlightRenderAction, SoHighlightRenderAction, SoGLRenderAction, SoSelection, SoWinRenderArea, SoDrawStyle, SoInteraction

Definition at line 115 of file SoColorHighlightRenderAction.h.

Constructor & Destructor Documentation

◆ SoColorHighlightRenderAction() [1/2]

SoColorHighlightRenderAction::SoColorHighlightRenderAction ( )

◆ SoColorHighlightRenderAction() [2/2]

SoColorHighlightRenderAction::SoColorHighlightRenderAction ( const SbViewportRegion viewportRegion)

◆ ~SoColorHighlightRenderAction()

virtual SoColorHighlightRenderAction::~SoColorHighlightRenderAction ( )
virtual

Member Function Documentation

◆ exitClass()

static void SoColorHighlightRenderAction::exitClass ( )
static

◆ getClassTypeId()

static SoType SoColorHighlightRenderAction::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getColor()

const SbColor & SoColorHighlightRenderAction::getColor ( ) const

Gets the color of the highlight.

◆ getTypeId()

virtual SoType SoColorHighlightRenderAction::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoHighlightRenderAction.

◆ initClass()

static void SoColorHighlightRenderAction::initClass ( )
static

◆ setColor()

void SoColorHighlightRenderAction::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.


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