SOBOXHIGHLIGHTRENDERACTION(3iv)

πŸ’– SoBoxHighlightRenderAction πŸ’–

okay so bestie, welcome to the manual page for SoBoxHighlightRenderAction from the 3IV manual β€” a selection highlight style, and honestly? it's giving glow-up for your scene graph. ✨


🌸 NAME 🌸

SoBoxHighlightRenderAction β€” a selection highlight style πŸŽ€


πŸ¦‹ INHERITS FROM πŸ¦‹

SoAction > SoGLRenderAction > SoBoxHighlightRenderAction

so yeah, it's deep in the family tree, and it picked up some iconic inherited methods along the way. πŸ’…


✨ SYNOPSIS ✨

#include <Inventor/actions/SoBoxHighlightRenderAction.h>

🫢 Methods from class SoBoxHighlightRenderAction

                     SoBoxHighlightRenderAction()
virtual void        apply(SoNode *node)
void                setVisible(SbBool b)
SbBool              isVisible() const
void                setColor(const SbColor &c)
SbColor &           getColor()
void                setLinePattern(unsigned short pattern)
unsigned short      getLinePattern()
void                setLineWidth(float width)
float               getLineWidth()

🌈 Methods from class SoGLRenderAction

void                      setViewportRegion(const SbViewportRegion
                               &newRegion)
const SbViewportRegion &  getViewportRegion() const
void                      setUpdateArea(const SbVec2f &origin, const
                               SbVec2f &size)
void                      getUpdateArea(SbVec2f &origin, SbVec2f &size)
                               const
void                      setAbortCallback(SoGLRenderAbortCB *func, void
                               *userData)
void                      setTransparencyType(TransparencyType type)
TransparencyType          getTransparencyType() const
void                      setSmoothing(SbBool smooth)
SbBool                    isSmoothing() const
void                      setNumPasses(int num)
int                       getNumPasses() const
void                      setPassUpdate(SbBool flag)
SbBool                    isPassUpdate() const
void                      setPassCallback(SoGLRenderPassCB *func, void
                               *userData)
void                      setCacheContext(uint32_t context)
uint32_t                  getCacheContext() const

πŸ‘‘ Methods from class SoAction

static SoType       getClassTypeId()
virtual SoType      getTypeId()
virtual SbBool      isOfType(SoType type)
virtual void        invalidateState()

πŸ’œ DESCRIPTION πŸ’œ

okay so SoBoxHighlightRenderAction is a render action that does the absolute most in the best way: it renders the specified scene graph, and then it renders wireframe boxes surrounding each selected object. main character behavior, no cap. πŸ”₯

the selected objects are specified by the first SoSelection node in the scene to which this action is applied. that's the vibe check right there.

and listen β€” if an SoGetBoundingBoxAction applied to a selected object produces an empty bounding box, then no highlight is rendered for that object. it's giving "nothing to see here." πŸ’€

a highlight render action can be passed to the setGLRenderAction() method of SoXtRenderArea to have an effect on scene graphs. yes bestie, that's the plug. 🫢


πŸŽ€ METHODS πŸŽ€

  • SoBoxHighlightRenderAction() β€” constructor. that's it, that's the girl. just born, ready to highlight. ✨
  • virtual void 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. like, two jobs, both slayed. πŸ’…
  • void 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.
  • SbBool isVisible() const β€” returns whether highlights will be rendered or not. simple, clean, iconic. 🌸
  • void setColor(const SbColor &c) SbColor & getColor() β€” set and get 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.
  • void setLinePattern(unsigned short pattern) unsigned short 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. ⚠️ the application is responsible for forcing a redraw of the scene to see the effects of this change.
  • void setLineWidth(float width) float getLineWidth() β€” set and get 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.

🌟 EXAMPLE 🌟

here is an example of how a box highlight can be specified for a particular selection node and render area. copy it exactly bestie, it's that girl. πŸ’–

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

all of them are besties, go read them too. πŸ¦‹


and that's the whole page, bestie!! this was SoBoxHighlightRenderAction(3IV)() β€” same title top and bottom, same manual, and that footer line is literally the source/version-and-date situation right there, so consider it mentioned with love. πŸ’œ bye, go highlight something gorgeous. πŸŽ€βœ¨