SOTRIANGLESTRIPSET(3iv)

πŸ’– SoTriangleStripSet πŸ’–

okay bestie, we're doing the SoTriangleStripSet(3IV) page today, and honestly? it's giving legend behavior. triangle strip set shape node. that's the whole vibe. let's go πŸ¦‹


✨ NAME ✨

SoTriangleStripSet β€” triangle strip set shape node πŸ‘‘


🌸 INHERITS FROM 🌸

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoNonIndexedShape > SoTriangleStripSet

like... look at that bloodline. iconic lineage fr fr πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <Inventor/nodes/SoTriangleStripSet.h>

Fields from class SoTriangleStripSet:

SoMFInt32           numVertices

Fields from class SoNonIndexedShape:

SoSFInt32           startIndex

Fields from class SoVertexShape:

SoSFNode            vertexProperty

Methods from class SoTriangleStripSet:

                     SoTriangleStripSet()
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 this shape node builds triangle strips out of vertices. the vertices can come from the vertexProperty field (that one's inherited from SoVertexShape), or from the current inherited coordinates. and ngl, if you want optimal performance? use the vertexProperty field. trust. πŸ’―

SoTriangleStripSet is literally one of the fastest ways to draw polygonal objects in Inventor. it takes the current coordinates, in order, starting with the very first one. the values in the numVertices field tell you how many vertices to use for each triangle strip in the set β€” and the number of values in that field is what determines the number of strips. periodt.

for example: if numVertices holds the values [3,5], then coordinates 1, 2, and 3 get used for the first triangle strip, and coordinates 4, 5, 6, 7, and 8 get used for the second strip. that gives you 1 triangle in the first strip and 3 in the second. math ate that πŸ’…

the coordinates of the strips get transformed by the current cumulative transformation. the strips are drawn with the current light model and drawing style. no notes.

now, treatment of the current material and normal binding, bestie, listen up:

  • the PER_PART binding specifies a material or normal for each strip of the set.
  • the PER_FACE binding specifies a material or normal for each triangle.
  • the _INDEXED bindings are equivalent to their non-indexed counterparts.
  • the default normal binding is PER_VERTEX.
  • the default material binding is OVERALL.
⚠️ if any normals (or materials) are specified, Inventor assumes you provide the correct number of them, as indicated by the binding. you WILL see unexpected results if you specify fewer normals (or materials) than the shape requires. 😭 don't do that to yourself.

if no normals are specified, they get generated automatically. she's self-sufficient 🧚


πŸ“ FIELDS πŸ“

  • SoMFInt32 numVertices β€” number of vertices in each triangle strip. the number of strips equals the number of values in this field. simple as that πŸ’–

πŸ’œ METHODS πŸ’œ

  • SoTriangleStripSet() β€” creates a triangle strip set node with default settings. a fresh baby node, born ready ✨
  • static SoType getClassTypeId() β€” returns the type identifier for this class. it's giving ID card πŸͺͺ

πŸ”₯ ACTION BEHAVIOR πŸ”₯

  • SoGLRenderAction β€” draws a strip set based on the current coordinates, normals, materials, drawing style, and so on. the main character doing main character things πŸ‘‘
  • SoRayPickAction β€” picks on the strip set based on the current coordinates and transformation. details about the intersection come back in an SoFaceDetail. she's nosy and we love that πŸ™ˆ
  • SoGetBoundingBoxAction β€” computes the bounding box that encloses all vertices of the strip set, with the current transformation applied to them. it sets the center to the average of the coordinates of all vertices. centering, as always πŸ’…
  • SoCallbackAction β€” if any triangle callbacks are registered with the action, they get invoked for each successive triangle forming the strips of the set. every single one. no skipping. 🌸

⭐ FILE FORMAT/DEFAULTS ⭐

TriangleStripSet {
    vertexProperty  NULL
    startIndex      0
    numVertices     -1
}

look at those defaults. NULL, 0, -1. minimal, clean, unbothered πŸ’–


πŸ¦‹ SEE ALSO πŸ¦‹

SoCoordinate3, SoDrawStyle, SoFaceDetail, SoFaceSet, SoIndexedTriangleStripSet, SoQuadMesh, SoVertexProperty

go read those too bestie, iykyk πŸ’•


and that's the whole page, bestie β€” SoTriangleStripSet(3IV)(), the source/version line and everything, all wrapped up πŸŽ€ slay, no cap, fr fr. now go build something gorgeous with your triangle strips. mwah πŸ’…πŸ’–