man SoBoxHighlightRenderAction () - a selection highlight style

NAME

SoBoxHighlightRenderAction - a selection highlight style

INHERITS FROM

SoAction > SoGLRenderAction > SoBoxHighlightRenderAction

SYNOPSIS

#include <Inventor/actions/SoBoxHighlightRenderAction.h> Methods from class SoBoxHighlightRenderAction: c } c } SoBoxHighlightRenderAction()

c } c } apply(SoNode *node)

c } c } setVisible(SbBool b)

c } c } isVisible() const

c } c } setColor(const SbColor &c)

c } c } getColor()

c } c } setLinePattern(unsigned short pattern)

c } c } getLinePattern()

c } c } setLineWidth(float width)

c } c } getLineWidth() Methods from class SoGLRenderAction: c } c } setViewportRegion(const SbViewportRegion &newRegion)

c } c } getViewportRegion() const

c } c } setUpdateArea(const SbVec2f &origin, const SbVec2f &size)

c } c } getUpdateArea(SbVec2f &origin, SbVec2f &size) const

c } c } setAbortCallback(SoGLRenderAbortCB *func, void *userData)

c } c } setTransparencyType(TransparencyType type)

c } c } getTransparencyType() const

c } c } setSmoothing(SbBool smooth)

c } c } isSmoothing() const

c } c } setNumPasses(int num)

c } c } getNumPasses() const

c } c } setPassUpdate(SbBool flag)

c } c } isPassUpdate() const

c } c } setPassCallback(SoGLRenderPassCB *func, void *userData)

c } c } setCacheContext(uint32_t context)

c } c } getCacheContext() const Methods from class SoAction: c } c } getClassTypeId()

c } c } getTypeId()

c } c } isOfType(SoType type)

c } c } invalidateState()

DESCRIPTION

SoBoxHighlightRenderAction is a render action which renders the specified scene graph, then renders wireframe boxes surrounding each selected object. Selected objects are specified by the first SoSelection node in the scene to which this action is applied. If an SoGetBoundingBoxAction applied to a selected object produces an empty bounding box, no highlight is rendered for that object. A highlight render action can be passed to the setGLRenderAction() method of SoXtRenderArea to have an effect on scene graphs.

METHODS

c } c } SoBoxHighlightRenderAction()

Constructor. c } c } apply(SoNode *node)

This renders the passed scene graph, and also renders wireframe boxes around selected objects as specified by the first SoSelection node found in the scene graph. c } c } setVisible(SbBool b)

This provides a convenient mechansim 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. c } c } isVisible() const

Returns whether highlights will be rendered or not. c } c } setColor(const SbColor &c)

c } c } getColor()

Set and get the color of the highlight. Default is red (1,0,0). Application is responsible for forcing a redraw of the scene to see the effects of this change. c } c } setLinePattern(unsigned short pattern)

c } c } getLinePattern()

Set and get 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 a description. Application is responsible for forcing a redraw of the scene to see the effects of this change. c } c } setLineWidth(float width)

c } c } getLineWidth()

Set and get the line width of the highlight. Default is 3. Application is responsible for forcing a redraw of the scene to see the effects of this change.

EXAMPLE

Here is an example of how a box highlight can be specified for a particular selection node and render area.

SoXtRenderArea *myRenderArea; SoSelection *mySelection;

// Set the highlight render action myRenderArea->setGLRenderAction( new SoBoxHighlightRenderAction());

// Automatic redraw on selection changes myRenderArea->redrawOnSelectionChange(mySelection);

SEE ALSO

SoLineHighlightRenderAction, SoGLRenderAction, SoSelection, SoXtRenderArea, SoDrawStyle, SoInteraction