logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SoBoxHighlightRenderAction — a selection highlight style

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.

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;//SetthehighlightrenderactionmyRenderArea->setGLRenderAction(newSoBoxHighlightRenderAction());//AutomaticredrawonselectionchangesmyRenderArea->redrawOnSelectionChange(mySelection);

Inherits From

       SoAction > SoGLRenderAction > SoBoxHighlightRenderAction

Methods

SoBoxHighlightRenderAction()
          Constructor.

     virtualvoidapply(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.

     voidsetVisible(SbBoolb)
          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.

     SbBoolisVisible()const
          Returns whether highlights will be rendered or not.

     voidsetColor(constSbColor&c)SbColor&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.

     voidsetLinePattern(unsignedshortpattern)unsignedshortgetLinePattern()
          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.

     voidsetLineWidth(floatwidth)floatgetLineWidth()
          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.

Name

       SoBoxHighlightRenderAction — a selection highlight style

See Also

SoLineHighlightRenderAction,SoGLRenderAction,SoSelection,SoXtRenderArea,SoDrawStyle,SoInteractionSoBoxHighlightRenderAction(3IV)()

Synopsis

#include<Inventor/actions/SoBoxHighlightRenderAction.h>

          Methods from class SoBoxHighlightRenderAction:

                         SoBoxHighlightRenderAction()virtualvoidapply(SoNode*node)voidsetVisible(SbBoolb)SbBoolisVisible()constvoidsetColor(constSbColor&c)SbColor&getColor()voidsetLinePattern(unsignedshortpattern)unsignedshortgetLinePattern()voidsetLineWidth(floatwidth)floatgetLineWidth()

          Methods from class SoGLRenderAction:

     voidsetViewportRegion(constSbViewportRegion&newRegion)constSbViewportRegion&getViewportRegion()constvoidsetUpdateArea(constSbVec2f&origin,constSbVec2f&size)voidgetUpdateArea(SbVec2f&origin,SbVec2f&size)constvoidsetAbortCallback(SoGLRenderAbortCB*func,void*userData)voidsetTransparencyType(TransparencyTypetype)TransparencyTypegetTransparencyType()constvoidsetSmoothing(SbBoolsmooth)SbBoolisSmoothing()constvoidsetNumPasses(intnum)intgetNumPasses()constvoidsetPassUpdate(SbBoolflag)SbBoolisPassUpdate()constvoidsetPassCallback(SoGLRenderPassCB*func,void*userData)voidsetCacheContext(uint32_tcontext)uint32_tgetCacheContext()const

          Methods from class SoAction:

     staticSoTypegetClassTypeId()virtualSoTypegetTypeId()virtualSbBoolisOfType(SoTypetype)virtualvoidinvalidateState()

See Also