SOINDEXEDSHAPE(3iv)
π NAME π
SoIndexedShape β the abstract base class for all indexed vertex-based shapes. She's the blueprint, not the building, and honestly? Queen behavior. π This page is from manual section 3IV, and bestie, we're gonna get through every single line of it together.
π¦ INHERITS FROM π¦
SoBase > SoFieldContainer > SoNode > SoShape > SoVertexShape > SoIndexedShape
Look at that family tree, she comes from a long line of icons. π
β¨ SYNOPSIS β¨
#include <Inventor/nodes/SoIndexedShape.h>
Fields from class SoIndexedShape
SoMFInt32 coordIndex
SoMFInt32 materialIndex
SoMFInt32 normalIndex
SoMFInt32 textureCoordIndex
Fields from class SoVertexShape
SoSFNode vertexProperty
Methods from class SoIndexedShape
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 πΈ
Okay so real talk: this node is the abstract base class for all vertex-based shapes that get constructed from indices. We're talking SoIndexedFaceSet, SoIndexedTriangleStripSet, and SoIndexedLineSet. And the way that SoIndexedShape defines fields that literally all of its subclasses use? It's giving "mom of the group". π«Ά
Every subclass of SoNonIndexedShape constructs its objects using the coordinates specified by the vertexProperty field (which comes from SoVertexShape), or the current inherited coordinates. The coordIndex field that this class defines holds the indices into the current coordinates of the shape's vertices. Those same indices also get used for materials, normals, or texture coordinates when the appropriate binding is PER_VERTEX_INDEXED. Slay. π
Material and normal bindings get interpreted like this for each subclass:
OVERALLβ one material for the entire shape.PER_PARTβ specific to the subclass.PER_PART_INDEXEDβ same asPER_PART, using indices from thematerialIndexornormalIndexfield.PER_FACEβ specific to the subclass.PER_FACE_INDEXEDβ same asPER_FACE, using indices from thematerialIndexornormalIndexfield.PER_VERTEXβ one material per vertex.PER_VERTEX_INDEXEDβ one material per vertex, using indices from thematerialIndexornormalIndexfield.
When any _INDEXED binding is used for materials or normals, the materialIndex or normalIndex field is what determines the indices for the materials or normals. And if that field contains a single value of -1 (which is the default, bestie), then the coordinate indices from the coordIndex field get used for materials or normals too. When the binding is PER_VERTEX_INDEXED, indices in these fields that correspond to negative indices in coordIndex are skipped; for other index bindings, all the values in the fields are used, in order. No skipping, no drama.
Explicit texture coordinates (as defined by SoTextureCoordinate2) may be bound to the vertices of an indexed shape consecutively (if the texture coordinate binding is PER_VERTEX) or by using the indices in the textureCoordIndex field (if the binding is PER_VERTEX_INDEXED). And just like with all vertex-based shapes: if there's a current texture but no texture coordinates are specified, a default texture coordinate mapping gets calculated using the bounding box of the shape. β¨
β οΈ Okay this part is important, do NOT skip it: be sure that the indices contained in thecoordIndex,materialIndex,normalIndex, andtextureCoordIndexfields are valid with respect to the current state, or errors will occur. Not a vibe. Not a slay. Errors. π
π FIELDS π
SoMFInt32 coordIndexβ the indices of the coordinates that the shape uses as its vertices. Those coordinates connect to form faces, lines, or other shapes, and each subclass defines its own special negative indices to use to indicate separation between faces, lines, and so on. Think of it as the group chat where everyone's actually connected. πSoMFInt32 materialIndexSoMFInt32 normalIndexSoMFInt32 textureCoordIndex
These three are the indices of the materials, normals, and texture coordinates that are used for the shape. They're only used when the appropriate binding is one of the _INDEXED bindings, okay? By default, the values of these fields indicate that the coordinate indices should be used for materials, normals, or texture coordinates as well. Default behavior, iconic behavior. π
π§ METHODS π§
static SoType getClassTypeId()β returns the type identifier for this class. That's it, that's the whole job, and she does it flawlessly. β
π FILE FORMAT/DEFAULTS π
This is an abstract class, bestie. She doesn't have her own format or defaults β you gotta go see the reference page of a derived class for the format and default values. The main character doesn't do her own paperwork. π
π₯ SEE ALSO π₯
SoIndexedFaceSetSoIndexedLineSetSoIndexedTriangleStripSetSoMaterialBindingSoNonIndexedShapeSoNormalBindingSoShapeHintsSoTextureCoordinateBinding
And that's the whole page, bestie!! π«Ά This was SoIndexedShape(3IV)() from the 3IV manual β abstract base class energy, no cap, and every single detail accounted for. Now go forth and make sure your indices are valid, or the errors will humble you. πβ¨ π
π¦ 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