SOINDEXEDLINESET(3iv)

πŸ’– SoIndexedLineSet β€” indexed polyline shape node πŸ’–

okay bestie, gather round, because we're about to talk about SoIndexedLineSet, aka the manual page SoIndexedLineSet(3IV) β€” yes that's the whole name up top, that's the vibe, we're in section 3IV, no notes. πŸŽ€


🌈 INHERITS FROM

the whole family tree, and it's giving ✨legacy✨:

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape >
SoIndexedShape > SoIndexedLineSet

✨ SYNOPSIS

first of all, the include, copy it exactly bestie:

#include <Inventor/nodes/SoIndexedLineSet.h>

🫢 Fields from class SoIndexedShape

SoMFInt32           coordIndex
SoMFInt32           materialIndex
SoMFInt32           normalIndex
SoMFInt32           textureCoordIndex

🫢 Fields from class SoVertexShape

SoSFNode            vertexProperty

🫢 Methods from class SoIndexedLineSet

                     SoIndexedLineSet()
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 what even is this node. SoIndexedLineSet is a 3D shape β€” and that shape is made by building polylines out of vertices. where do those vertices live? either at the coordinates in the vertexProperty field (which it inherits from SoVertexShape), or at the current inherited coordinates. and bestie, listen β€” for optimal performance, vertexProperty is the recommended one. the engine is literally begging you. πŸ™ˆ

the way it works: SoIndexedLineSet uses the indices in the coordIndex field (inherited from SoIndexedShape) to specify the polylines. and here's the iconic part β€” an index of SO_END_LINE_INDEX (-1) means the current polyline has ended and the next one begins. it's a little period at the end of a sentence, but for lines. periodt. πŸ’€

the coordinates get transformed by the current cumulative transformation. the lines are drawn with the current light model and drawing style β€” and yes, drawing style FILLED is treated as LINES, no cap. πŸ”₯

now the material and normal binding tea, because this part matters:

  • PER_PART binding specifies a material or normal for each segment of the line.
  • PER_FACE binding specifies a material or normal for each polyline.
  • PER_VERTEX specifies a material or normal for each vertex.
  • the corresponding _INDEXED bindings are the same, but they use the materialIndex or normalIndex indices (see SoIndexedShape).

the default material binding is OVERALL. the default normal binding is PER_VERTEX_INDEXED.

and one more thing β€” the current complexity value has no effect on the rendering of indexed line sets. it simply does not care. not its business. πŸ’…


πŸ‘‘ METHODS

  • SoIndexedLineSet() β€” creates an indexed line set node with default settings. a fresh baby node, defaults and all. πŸŽ€
  • static SoType getClassTypeId() β€” returns type identifier for this class. you need the type? boom, here's the type. ✨

πŸ¦‹ ACTION BEHAVIOR

SoGLRenderAction

draws lines based on the current coordinates, normals, materials, drawing style, and so on. and so on! the whole ensemble! 🌈

SoRayPickAction

picks lines based on the current coordinates and transformation. details about the intersection are returned in an SoLineDetail. so you get a whole little detail object. obsessed. πŸ’–

SoGetBoundingBoxAction

computes the bounding box that encloses all vertices of the line set with the current transformation applied to them. and it sets the center to the average of the coordinates of all vertices. math girlies rise. πŸ“βœ¨

SoCallbackAction

if any line segment callbacks are registered with the action, they will be invoked for each successive segment in the line set. every single one. no skipping. 🫢


πŸ“ FILE FORMAT/DEFAULTS

here's exactly what it looks like fresh out the box, defaults included, don't touch the numbers bestie:

IndexedLineSet {
    vertexProperty     NULL
    coordIndex         0
    materialIndex      -1
    normalIndex        -1
    textureCoordIndex  -1
}

🌸 SEE ALSO

the besties, the mutuals, the group chat:

  • SoCoordinate3
  • SoDrawStyle
  • SoLineDetail
  • SoLineSet
  • SoVertexProperty

okay that's the whole page! and for the little sign-off: the man page version and date slots at the bottom are literally empty β€” it just says SoIndexedLineSet(3IV)() up top and again at the bottom, so no version, no date, nothing. iconic of it honestly. slay, go draw some lines. πŸ’œπŸ§šπŸ’