SODRAWSTYLE(3iv)
β¨ SoDrawStyle β¨
okay bestie, listen UP π
this is the tea on SoDrawStyle, a page from the <hotpink>3IV</hotpink> manual β it's the node that decides how stuff gets drawn in your scene graph, and honestly? it's giving main character energy for something so small π
πΈ NAME πΈ
SoDrawStyle β the node that defines the style to use when rendering. literally it's the glow-up node for your shapes β¨
𧬠INHERITS FROM π§¬
SoBase > SoFieldContainer > SoNode > SoDrawStyle
so yeah, it's deep in the family tree, iykyk π³
π SYNOPSIS π
#include <Inventor/nodes/SoDrawStyle.h>
okay so first up, the enum that runs the whole vibe:
enum Style {
SoDrawStyle::FILLED Draw filled regions
SoDrawStyle::LINES Draw only outlines (wire frame)
SoDrawStyle::POINTS Draw points at vertices
SoDrawStyle::INVISIBLE Do not draw anything at all
}
INVISIBLE really said "not me existing today" π iconic honestly.
Fields from class SoDrawStyle:
SoSFEnum style
SoSFFloat pointSize
SoSFFloat lineWidth
SoSFUShort linePattern
Methods from class SoDrawStyle:
SoDrawStyle()
static SoType getClassTypeId()
Methods from class SoNode:
void setOverride(SbBool state)
SbBool isOverride() const
SoNode * copy(SbBool copyConnections = FALSE) const
virtual SbBool affectsState() const
static SoNode * getByName(const SbName &name)
static int getByName(const SbName &name, SoNodeList &list)
Methods from class SoFieldContainer:
void setToDefaults()
SbBool hasDefaultValues() const
SbBool fieldsAreEqual(const SoFieldContainer *fc) const
void copyFieldValues(const SoFieldContainer *fc, SbBool
copyConnections = FALSE)
SbBool set(const char *fieldDataString)
void get(SbString &fieldDataString)
virtual int getFields(SoFieldList &resultList) const
virtual SoField * getField(const SbName &fieldName) const
SbBool getFieldName(const SoField *field, SbName &fieldName)
const
SbBool isNotifyEnabled() const
SbBool enableNotify(SbBool flag)
Methods from class SoBase:
void ref()
void unref() const
void unrefNoDelete() const
void touch()
virtual SoType getTypeId() const
SbBool isOfType(SbType type) const
virtual void setName(const SbName &name)
virtual SbName getName() const
π DESCRIPTION π
okay so here's the whole point of this node, bestie: SoDrawStyle sets the current drawing style for every single shape node that comes after it in the scene graph. it's a state node, so it just kinda walks through and sets the vibe for everyone downstream π
it specifies how primitives should be rendered. periodt.
β οΈ important, no cap: the drawing style has no effect on picking or callback primitive generation. so don't come for it about that, it literally doesn't do that π
π FIELDS π
SoSFEnum styleβ the drawing style itself. this is the moment, the whole lewk.SoSFFloat pointSizeβ radius of points (this one's forPOINTSstyle π).SoSFFloat lineWidthβ width of lines (forLINESstyle βοΈ).SoSFUShort linePatternβ the stipple pattern for lines (again,LINESstyle). values can range from0(invisible π») all the way up to0xffff(solid π―). this is the field that decides how dashed or dotted your lines are gonna be. slay.
π§ METHODS π§
SoDrawStyle()β creates a drawing style node with default settings. fresh out the box, defaults and all β¨static SoType getClassTypeId()β returns the type identifier for this class. it's basically the node's legal name πͺͺ
π₯ ACTION BEHAVIOR π₯
SoGLRenderAction,SoCallbackActionβ sets the current drawing style. that's it, that's the whole job, and it does it well π
π FILE FORMAT/DEFAULTS π
DrawStyle {
style FILLED
pointSize 0
lineWidth 0
linePattern 0xffff
}
so by default it's FILLED, points are 0, lines are 0 wide, and the line pattern is fully solid at 0xffff. a perfectly respectable starting point, ngl π«Ά
π SEE ALSO π
SoLightModel, SoPickStyle, SoShapeHints
go read those too, bestie, they're all part of the same friend group πΈ
and that's the whole page, mwah π this was SoDrawStyle(3IV)() β the <hotpink>3IV</hotpink> manual, version/date and all β so go forth and draw stylishly, you absolute icon ππ
π¦ 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