SOINDEXEDFACESET(3iv)

πŸ’… SoIndexedFaceSet β€” indexed polygonal face shape node ✨

okay bestie, so the manual name is SoIndexedFaceSet(3IV) and this is literally the whole vibe. sit down, grab a strawberry drink πŸ“, we're building polygons.


🌈 INHERITS FROM 🌈

like, its whole ancestry, its bloodline, its main character lineage:

SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape >
SoIndexedShape > SoIndexedFaceSet

every single one of those is its ancestor, no skipping generations πŸ’œ


✨ SYNOPSIS ✨

first things first, you gotta include it, that's non-negotiable:

#include <Inventor/nodes/SoIndexedFaceSet.h>

πŸŽ€ Fields from class SoIndexedShape

SoMFInt32           coordIndex
SoMFInt32           materialIndex
SoMFInt32           normalIndex
SoMFInt32           textureCoordIndex

πŸŽ€ Fields from class SoVertexShape

SoSFNode            vertexProperty

πŸŽ€ Methods from class SoIndexedFaceSet

                     SoIndexedFaceSet()
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 like. this node is a 3D shape made by constructing faces (yes, polygons, the flat girlies) out of vertices that live at the coordinates specified in the vertexProperty field (that's the one it got from SoVertexShape), or the current inherited state. and bestie, listen β€” for optimal performance, vertexProperty is the recommended one. highkey the move. πŸ’…

SoIndexedFaceSet uses the indices in the coordIndex field (inherited from SoIndexedShape, she gets it from her mother) to specify the polygonal faces. an index of SO_END_FACE_INDEX (-1) means "okay this face is DONE, next one starts now" 🫢. and for improved performance: arrange all the faces with only 3 vertices at the beginning of the list, then all the faces with 4 vertices, and finally all other faces. like organize your closet by category, it's the same energy.

the vertices of the faces get transformed by the current transformation matrix. the faces are drawn with the current light model and drawing style. periodt.

now, the treatment of the current material and normal binding, because this part matters:

  • PER_PART and PER_FACE bindings specify a material or normal for each face πŸŽ€
  • 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
⚠️ 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 😭 so pls, count them. no cap. but if no normals are specified, they will be generated automatically ✨ iconic behaviour honestly.

textures are applied as described for the SoIndexedShape class. go read that one, she explains it.


πŸ¦‹ METHODS πŸ¦‹

  • SoIndexedFaceSet() β€” creates an indexed face set node with default settings. brand new baby node, defaults on, ready to slay.
  • static SoType getClassTypeId() β€” returns the type identifier for this class. iykyk.

πŸ”₯ ACTION BEHAVIOR πŸ”₯

SoGLRenderAction

draws faces based on the current coordinates, normals, materials, drawing style, and so on. and so on. and so on. πŸ’œ

SoRayPickAction

picks faces based on the current coordinates and transformation. details about the intersection are returned in an SoFaceDetail. cute lil receipt of where you got hit πŸŽ€

SoGetBoundingBoxAction

computes the bounding box that encloses all vertices of the face 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 triangle callbacks are registered with the action, they will be invoked for each successive triangle generated from each face in the set. every. single. triangle. no skipping 🌸


πŸ’– FILE FORMAT/DEFAULTS πŸ’–

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

look at her, defaults and everything, she's perfect ✨


🌸 SEE ALSO 🌸

the whole friend group, go follow them:

  • SoCoordinate3
  • SoDrawStyle
  • SoFaceDetail
  • SoFaceSet
  • SoVertexProperty

okay that's the whole page bestie, go forth and index your faces πŸ’…βœ¨

and a lil sign-off: this was SoIndexedFaceSet(3IV)() β€” that's the source/version tag and the date stamp right there at the bottom of the page, mwah. thanks for reading, love u, bye πŸ«ΆπŸ’–πŸŽ€