SOLINEHIGHLIGHTRENDERACTION(3iv)
β¨ SoLineHighlightRenderAction β¨
okay bestie, gather round, because today we're talking about SoLineHighlightRenderAction from the <3IV> manual set β it's the selection highlight style action and she is literally the moment π
π INHERITS FROM
SoAction > SoGLRenderAction > SoLineHighlightRenderAction
so yes, she's the great-grandbaby of the whole action family tree, and she inherited every single one of those genes. slay π
β¨ SYNOPSIS β¨
#include <Inventor/actions/SoLineHighlightRenderAction.h>
Methods from class SoLineHighlightRenderAction:
SoLineHighlightRenderAction()
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 π
so SoLineHighlightRenderAction is a render action β and here's the tea: she renders the scene graph you give her, and then she goes back and renders each selected object again, in wireframe. iconic behaviour, honestly. β¨
and who decides what's "selected"? the first SoSelection node in the scene that this action gets applied to. that's the one calling the shots, periodt π
one lil' caveat tho β if a selected object has no renderable geometry in it, then no highlight gets rendered for that object. nothing to draw, nothing to glow up. π
also bestie, important: a highlight render action can be passed to the setGLRenderAction() method of SoXtRenderArea to have an affect on scene graphs. that's the hookup. that's how she gets into the group chat. π«Ά
π METHODS π
SoLineHighlightRenderAction()β the constructor, she's born. π«virtual void apply(SoNode *node)β this renders the scene graph you pass in, and also renders each selected object in wireframe, exactly as specified by the firstSoSelectionnode it finds in the scene graph. she does both. she's multitalented. πvoid setVisible(SbBool b)β a convenient mechansim for turning highlights off or back on. whenFALSEis passed, subsequent calls toapply()render the scene graph without rendering highlights. the application is responsible for forcing a redraw of the scene after changing this state. default visibility is on. no cap.SbBool isVisible() constβ returns whether highlights will be rendered or not. simple. clean. we love a getter. β¨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 affects of this change. yes, again. it's a whole thing. π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. seeSoDrawStylefor more information. and yes β the application is responsible for forcing a redraw of the scene to see the affects of this change. π¦void setLineWidth(float width)float getLineWidth()β set and get the line width of the highlight. default is3. and guess what β the application is responsible for forcing a redraw of the scene to see the affects of this change. we've been over this bestie but it keeps coming up π
πΈ EXAMPLE πΈ
here's how a line highlight can be specified for a particular selection node and render area β look at her go:
SoXtRenderArea *myRenderArea;
SoSelection *mySelection;
// Set the highlight render action
myRenderArea->setGLRenderAction(
new SoLineHighlightRenderAction());
// Automatic redraw on selection changes
myRenderArea->redrawOnSelectionChange(mySelection);
like. she's serving. automatic redraw on selection changes?? main character energy fr fr π
π SEE ALSO π
SoBoxHighlightRenderAction, SoGLRenderAction, SoSelection, SoXtRenderArea, SoDrawStyle, SoInteraction
and that's the whole page bestie!! this one came from the SoLineHighlightRenderAction(3IV) manual, dated and versioned exactly as that footer says β SoLineHighlightRenderAction(3IV)() β so if you ever forget, just know she's out here rendering your selections in wireframe and looking absolutely stunning while doing it πβ¨ππ¦
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms