Abstract base class for Highlight Render Actions. More...
#include <Inventor/actions/SoHighlightRenderAction.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
Returns the type identifier for this specific instance. | |
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 SbViewportRegion & | getViewportRegion () const |
Returns viewport region to use for rendering. | |
void | setLogicalViewportRegion (const SbViewportRegion &newLogicalRegion) |
Sets current logical viewport region to use for rendering. | |
const SbViewportRegion & | getLogicalViewportRegion () 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 ). | |
SoSceneManager * | getSceneManager () 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. | |
SoNode * | getNodeAppliedTo () const |
Returns the node the action is being applied to. | |
SoPath * | getPathAppliedTo () const |
Returns the path the action is being applied to. | |
const SoPathList * | getPathListAppliedTo () const |
Returns the path list the action is being applied to. | |
const SoPathList * | getOriginalPathListAppliedTo () 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 SoPath * | 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. | |
SoState * | getState () 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 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. | |
Friends | |
class | ::SoHighlightRenderActionSync |
class | ::SoTraversalPassHighlight |
class | inventor::impl::SoHighlightRenderActionImpl |
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... | |
Abstract base class for Highlight Render Actions.
To implement a new Highlight Render Action, the methods getPreTraversalNode() and getPostTraversalNode() can be implemented.
If a more complex highlighting is needed, then the apply() method can be re-implemented instead.
SoLineHighlightRenderAction, SoColorHighlightRenderAction, SoBoxHighlightRenderAction, SoHaloHighlightRenderAction, SoGLRenderAction, SoSelection, SoWinRenderArea, SoDrawStyle, SoInteraction
Definition at line 61 of file SoHighlightRenderAction.h.
|
virtual |
This renders the passed scene graph, and also renders highlighted selected objects as specified by the first SoSelection node found in the scene graph.
Reimplemented from SoGLRenderAction.
Reimplemented in SoBoxHighlightRenderAction.
|
virtual |
When applied, an action may reference nodes or create objects (e.g.
SoPath) that reference nodes. This is especially true for SoSearchAction and SoRayPickAction. These references will prevent the nodes from being destroyed and so may appear to be a "memory leak".
All references are cleared when the action is destroyed or re-applied. However it may be useful to clear them explicitly to remove references to nodes.
Reimplemented from SoAction.
|
static |
Returns the type identifier for this class.
|
virtual |
Returns the type identifier for this specific instance.
Reimplemented from SoGLRenderAction.
Reimplemented in SoBoxHighlightRenderAction, SoColorHighlightRenderAction, SoHaloHighlightRenderAction, and SoLineHighlightRenderAction.
SbBool SoHighlightRenderAction::isVisible | ( | ) | const |
Returns whether highlights will be rendered or not.
void SoHighlightRenderAction::setVisible | ( | SbBool | b | ) |
This provides a convenient mechanism for turning highlights off or on.
When FALSE is passed, subsequent calls to apply() render the scene graph without rendering highlights. The application is responsible for forcing a redraw of the scene after changing this state. The default visibility is on.
|
friend |
Definition at line 150 of file SoHighlightRenderAction.h.
|
friend |
Definition at line 151 of file SoHighlightRenderAction.h.
|
friend |
Definition at line 152 of file SoHighlightRenderAction.h.