SOLINESET(3iv)

πŸ’… SoLineSet β€” polyline shape node ✨

okay bestie, welcome to the SoLineSet(3IV) manual page, we're doing lines today and we're doing them gorgeously πŸŽ€


πŸ¦‹ INHERITS FROM

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape >
SoNonIndexedShape > SoLineSet

the family tree is giving legacy, the vibes are giving polyline πŸ‘‘


✨ SYNOPSIS

#include <Inventor/nodes/SoLineSet.h>

   Fields from class SoLineSet:

SoMFInt32           numVertices

   Fields from class SoNonIndexedShape:

SoSFInt32           startIndex

   Fields from class SoVertexShape:

SoSFNode            vertexProperty

   Methods from class SoLineSet:

                  SoLineSet()
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(SoType type) const
virtual void        setName(const SbName &name)
virtual SbName      getName() const

🌸 DESCRIPTION

So picture this: this node makes a 3D shape by building polylines out of vertices, and those vertices live at the coordinates you put in the vertexProperty field (that one's inherited from SoVertexShape), OR at the current inherited coordinates if you're being ✨spontaneous✨. For optimal performance, the vertexProperty field is recommended β€” ngl bestie, do it that way, it's the move πŸ’…

SoLineSet uses the coordinates in order, starting with the first one, no skipping, no chaos. Each line has a number of vertices given by a value in the numVertices field. Example time because examples ate:

an SoLineSet with a numVertices of [3,4,2] would use coordinates 1, 2, and 3 for the first line, coordinates 4, 5, 6, and 7 for the second line, and coordinates 8 and 9 for the third. 🫢

see how clean that is? three lines, seven... no wait, three plus four plus two, the math is mathing 😌

The number of values in the numVertices field tells you how many polylines are in the set. Count the values, that's your line count, periodt.

The coordinates of the line set get transformed by the current cumulative transformation. The lines are drawn with the current light model and drawing style β€” and heads up, drawing style FILLED is treated as LINES (she's flexible like that 🌈).

Now, treatment of the current material and normal binding, because this is the part people skip and then wonder why everything's ugly 😭:

  • The PER_PART binding specifies a material or normal for each segment of the line.
  • The PER_FACE binding specifies a material or normal for each polyline.
  • The _INDEXED bindings are equivalent to their non-indexed counterparts.
  • The default material binding is OVERALL.
  • The default normal binding is PER_VERTEX.

And the current complexity value? has no effect on the rendering of line sets. literally zero. don't ask her, she doesn't care πŸ’€


πŸŽ€ FIELDS

  • SoMFInt32 numVertices β€” Number of vertices per polyline. that's the whole job, and she does it flawlessly ✨

πŸ’œ METHODS

  • SoLineSet() β€” Creates a line set node with default settings. baby's first line set, iconic 🍼
  • static SoType getClassTypeId() β€” Returns type identifier for this class. iykyk πŸ¦‹

πŸ”₯ ACTION BEHAVIOR

  • SoGLRenderAction β€” Draws lines based on the current coordinates, normals, materials, drawing style, and so on. she renders, she serves πŸ‘‘
  • SoRayPickAction β€” Picks lines based on the current coordinates and transformation. Details about the intersection are returned in an SoLineDetail. receipts, but make them 3D 🧾
  • SoGetBoundingBoxAction β€” Computes the bounding box that encloses all vertices of the line set with the current transformation applied to them. Sets the center to the average of the coordinates of all vertices. she's centering herself, good for her πŸ’…
  • SoCallbackAction β€” If any line segment callbacks are registered with the action, they will be invoked for each successive segment in the line set. one by one by one, no skipping 🌸

⭐ FILE FORMAT/DEFAULTS

LineSet {
   vertexProperty  NULL
   startIndex      0
   numVertices     -1
}

that's the default fit, she wakes up like this and still looks good 😌


🌈 SEE ALSO

SoCoordinate3, SoDrawStyle, SoIndexedLineSet, SoLineDetail, SoVertexProperty

go read those too, bestie, they're all part of the friend group 🫢


and that's the whole page!! this was the SoLineSet page from the SoLineSet(3IV)() manual β€” no date on it, no source/version info beyond that section marker, so just take the title and run with it πŸŽ€ mwah, go draw some polylines, you're gonna slay πŸ’–βœ¨