SoVertexShape(3)
β¨ NAME β¨
okay so bestie, SoVertexShape is the superclass for all vertex based shapes. that's it, that's the whole job. it's the parent that all your vertex-y shapes are gonna descend from, and it's giving very much "i made you, you're welcome" energy π
this page lives in the Coin manual, section 3 (that's SoVertexShape(3) if you're keeping score, which you are, because you're a genius π§ β¨).
π SYNOPSIS π
first things first, you gotta pull it in:
#include <Inventor/nodes/SoVertexShape.h>
it Inherits SoShape (so like, everything SoShape can do? yeah, she does that too).
and it gets Inherited by SoIndexedShape, and SoNonIndexedShape. so those two are her children and they are thriving πΈ
π Public Member Functions π
here's what SoVertexShape brings to the table all on her own main-character self:
virtual SoType getTypeId (void) constβ the classic "who am i really" β¨virtual void notify (SoNotList *nl)β she tells people when stuff changes, as one doesvirtual SbBool generateDefaultNormals (SoState *state, SoNormalBundle *bundle)β making normals out of thin air, iconicvirtual SbBool generateDefaultNormals (SoState *state, SoNormalCache *cache)β same vibe, different flavor (this time with aSoNormalCache)virtual void write (SoWriteAction *action)β writing herself out, slay
π«Ά Public Member Functions inherited from SoShape
(the family recipes, passed down π)
virtual SbBool affectsState (void) constvirtual void getBoundingBox (SoGetBoundingBoxAction *action)virtual void GLRender (SoGLRenderAction *action)virtual void rayPick (SoRayPickAction *action)virtual void callback (SoCallbackAction *action)virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f ¢er)=0virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)const SoBoundingBoxCache * getBoundingBoxCache (void) const
π¦ Public Member Functions inherited from SoNode
void setOverride (const SbBool state)SbBool isOverride (void) constvoid setNodeType (const NodeType type)NodeType getNodeType (void) constvirtual SoNode * copy (SbBool copyconnections=FALSE) constvirtual void doAction (SoAction *action)virtual void GLRenderBelowPath (SoGLRenderAction *action)virtual void GLRenderInPath (SoGLRenderAction *action)virtual void GLRenderOffPath (SoGLRenderAction *action)virtual void getMatrix (SoGetMatrixAction *action)virtual void handleEvent (SoHandleEventAction *action)virtual void pick (SoPickAction *action)virtual void search (SoSearchAction *action)virtual void audioRender (SoAudioRenderAction *action)virtual void grabEventsSetup (void)virtual void grabEventsCleanup (void)virtual void startNotify (void)SbUniqueId getNodeId (void) constvirtual SoChildList * getChildren (void) constvirtual void writeInstance (SoOutput *out)virtual SoNode * addToCopyDict (void) constvirtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)virtual SoFieldContainer * copyThroughConnection (void) const
π Public Member Functions inherited from SoFieldContainer
void setToDefaults (void)SbBool hasDefaultValues (void) constSbBool fieldsAreEqual (const SoFieldContainer *container) constvoid copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=FALSE)SbBool set (const char *const fielddata)void get (SbString &fielddata)virtual int getFields (SoFieldList &l) constvirtual int getAllFields (SoFieldList &l) constvirtual SoField * getField (const SbName &name) constvirtual SoField * getEventIn (const SbName &name) constvirtual SoField * getEventOut (const SbName &name) constSbBool getFieldName (const SoField *const field, SbName &name) constSbBool enableNotify (const SbBool flag)SbBool isNotifyEnabled (void) constSbBool set (const char *fielddata, SoInput *input)void get (SbString &fielddata, SoOutput *out)virtual SbBool validateNewFieldValue (SoField *field, void *newval)virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)SbBool getIsBuiltIn (void) constvirtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged) constvoid setUserData (void *userdata) constvoid * getUserData (void) const
π Public Member Functions inherited from SoBase
void ref (void) constvoid unref (void) constvoid unrefNoDelete (void) constint32_t getRefCount (void) constvoid touch (void)SbBool isOfType (SoType type) constβ Returns TRUE if the type of this object is either of the same type or inherited from type. (basically "are you her or one of her ancestors" π )virtual SbName getName (void) constvirtual void setName (const SbName &newname)void addAuditor (void *const auditor, const SoNotRec::Type type)void removeAuditor (void *const auditor, const SoNotRec::Type type)const SoAuditorList & getAuditors (void) constSbBool shouldWrite (void)void assertAlive (void) const
β Static Public Member Functions β
static SoType getClassTypeId (void)static void initClass (void)
πΈ Static Public Member Functions inherited from SoShape
static SoType getClassTypeId (void)static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. (the whole "registering herself in the system" moment β¨)static void getScreenSize (SoState *const state, const SbBox3f &boundingbox, SbVec2s &rectsize)static float getDecimatedComplexity (SoState *state, float complexity)
π§ Static Public Member Functions inherited from SoNode
static uint32_t getCompatibilityTypes (const SoType &nodetype)static SoType getClassTypeId (void)static SoNode * getByName (const SbName &name)static int getByName (const SbName &name, SoNodeList &l)static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.static void initClasses (void)static SbUniqueId getNextNodeId (void)static int getActionMethodIndex (const SoType type)static void getBoundingBoxS (SoAction *action, SoNode *node)static void GLRenderS (SoAction *action, SoNode *node)static void callbackS (SoAction *action, SoNode *node)static void getMatrixS (SoAction *action, SoNode *node)static void handleEventS (SoAction *action, SoNode *node)static void pickS (SoAction *action, SoNode *node)static void rayPickS (SoAction *action, SoNode *node)static void searchS (SoAction *action, SoNode *node)static void writeS (SoAction *action, SoNode *node)static void audioRenderS (SoAction *action, SoNode *node)static void getPrimitiveCountS (SoAction *action, SoNode *node)
π Static Public Member Functions inherited from SoFieldContainer
static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.static SoType getClassTypeId (void)β This static method returns theSoTypeobject associated with objects of this class.static void cleanupClass (void)static void initCopyDict (void)static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)static SoFieldContainer * checkCopy (const SoFieldContainer *orig)static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)static void copyDone (void)
π¦ Static Public Member Functions inherited from SoBase
static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.static SoType getClassTypeId (void)β This static method returns theSoTypeobject associated with objects of this class.static void addName (SoBase *const base, const char *const name)static void removeName (SoBase *const base, const char *const name)static void incrementCurrentWriteCounter (void)static void decrementCurrentWriteCounter (void)static SoBase * getNamedBase (const SbName &name, SoType type)static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)static SbBool read (SoInput *input, SoBase *&base, SoType expectedtype)static void setInstancePrefix (const SbString &c)static void setTraceRefs (SbBool trace)static SbBool getTraceRefs (void)static SbBool connectRoute (SoInput *input, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)static SbBool readRoute (SoInput *input)
π Public Attributes π
just the one, and she's important:
SoSFNode vertexPropertyβ yes bestie, it's anSoSFNodeand it's calledvertexProperty, and it is right there on the public interface, living her best life π
π Protected Member Functions π
the ones you only get if you're in the family (i.e. subclassing, iykyk):
virtual const SoFieldData * getFieldData (void) constSoVertexShape (void)β the constructor herself πvirtual ~SoVertexShape ()β and the destructor, she's virtual, as she should bevirtual SbBool shouldGLRender (SoGLRenderAction *action)void setNormalCache (SoState *const state, const int num, const SbVec3f *normals)SoNormalCache * getNormalCache (void) constSoNormalCache * generateAndReadLockNormalCache (SoState *const state)void getVertexData (SoState *state, const SoCoordinateElement *&coords, const SbVec3f *&normals, const SbBool neednormals)void readLockNormalCache (void)void readUnlockNormalCache (void)
ok that's the whole top half of this page β the declarations, the inheritance, the attributes, all of it, no cap. but wait, bestie, there's more coming in the next parts so don't you dare close the tab πβ¨
π«Ά Protected Member Functions inherited from SoShape
okay so these are the family-only helpers that SoShape passes down to every shape that inherits it β protected, so they're for subclasses only, not for random code to grab π all of them, in order, no skips:
SoShape (void)β the inherited constructor, protected vibes only.virtual ~SoShape ()β the inherited destructor, also virtual, also protected.float getComplexityValue (SoAction *action)β takes anSoAction *action, returns afloat.virtual void generatePrimitives (SoAction *action)=0β pure virtual, note the=0, so somebody's gotta implement it πvoid beginSolidShape (SoGLRenderAction *action)β inherited, protected, takes anSoGLRenderAction *action.void endSolidShape (SoGLRenderAction *action)β the matching one, same signature shape.void GLRenderBoundingBox (SoGLRenderAction *action)β capital letters at the front and everything.SbBool shouldPrimitiveCount (SoGetPrimitiveCountAction *action)β returns anSbBool.SbBool shouldRayPick (SoRayPickAction *const action)βconston the pointer,SbBoolout.void computeObjectSpaceRay (SoRayPickAction *const action)β and there are two of these bad boys, so watch which one you mean:void computeObjectSpaceRay (SoRayPickAction *const action, const SbMatrix &matrix)β the overload withconst SbMatrix &matrixπvirtual SoDetail * createTriangleDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp)β virtual, returns anSoDetail *.virtual SoDetail * createLineSegmentDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, SoPickedPoint *pp)β same energy, two vertices instead of three.virtual SoDetail * createPointDetail (SoRayPickAction *action, const SoPrimitiveVertex *v, SoPickedPoint *pp)β and now just one vertex. the way that it scales down πvoid invokeTriangleCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3)β threeconstvertices, very thorough.void invokeLineSegmentCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2)β two of them.void invokePointCallbacks (SoAction *const action, const SoPrimitiveVertex *const v)β one. iconic minimalism β¨void beginShape (SoAction *const action, const TriangleShape shapetype, SoDetail *const detail=NULL)β note thedetail=NULLdefault, that's the good stuff.void shapeVertex (const SoPrimitiveVertex *const v)β one vertex in, nothing out.void endShape (void)β closes the shape, takes literally nothing.void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoMultiTextureCoordinateElement *const tce, const float s, const float t, const SbVec3f &normal)β the 2D-texture-coord version.void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoMultiTextureCoordinateElement *const tce, const float s, const float t, const float r, const SbVec3f &normal)β and the overload with that extraconst float rπSbBool startVertexArray (SoGLRenderAction *action, const SoCoordinateElement *coords, const SbVec3f *pervertexnormals, const SbBool texpervertex, const SbBool colorpervertex)β returnsSbBool, takes five things.void finishVertexArray (SoGLRenderAction *action, const SbBool vbo, const SbBool normpervertex, const SbBool texpervertex, const SbBool colorpervertex)β the finisher. note it also has thatvboflag π
π¦ Protected Member Functions inherited from SoNode
SoNode (void)β constructor, protected.virtual ~SoNode ()β destructor, virtual, protected.virtual SbBool readInstance (SoInput *in, unsigned short flags)β virtual, returnsSbBool.
π¦ Protected Member Functions inherited from SoFieldContainer
SoFieldContainer (void)β constructor.virtual ~SoFieldContainer ()β destructor, virtual.
π¦ Protected Member Functions inherited from SoBase
SoBase (void)β constructor.virtual ~SoBase ()β destructor, virtual.virtual void destroy (void)β virtual destroy, takes nothing.SbBool hasMultipleWriteRefs (void) constβconstmethod, returnsSbBool.SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constβconst, three args.void writeFooter (SoOutput *out) constβconst, one arg.virtual const char * getFileFormatName (void) constβ virtual,const, returns aconst char *.virtual SoNotRec createNotRec (void)β virtual, returns anSoNotRecby value.
π Static Protected Member Functions
static const SoFieldData ** getFieldDataPtr (void)β static, protected, returns aconst SoFieldData **. the double pointer is giving very much power π
π Static Protected Member Functions inherited from SoShape
static const SoFieldData ** getFieldDataPtr (void)β same signature, different ancestor. yes it really is listed again π«
π Static Protected Member Functions inherited from SoNode
static const SoFieldData ** getFieldDataPtr (void)β third time's the charm β¨static void setNextActionMethodIndex (int index)β takes anint index.static int getNextActionMethodIndex (void)β returns anint.static void incNextActionMethodIndex (void)β the "inc" one, no args.static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask)β takes aconst SoType &nodetypeand aconst uint32_t bitmask.
π Static Protected Member Functions inherited from SoBase
static uint32_t getCurrentWriteCounter (void)β returns auint32_t.static void staticDataLock (void)β no args.static void staticDataUnlock (void)β its other half π«Ά
π Additional Inherited Members
π Public Types inherited from SoShape
enum TriangleShape { TRIANGLE_STRIP, TRIANGLE_FAN, TRIANGLES, POLYGON, QUADS, QUAD_STRIP, POINTS, LINES, LINE_STRIP }β all nine of them, in that exact order, bestie π₯
π Public Types inherited from SoNode
enum NodeType { INVENTOR = 0x0000, VRML1 = 0x0001, VRML2 = 0x0002, INVENTOR_1 = 0x0004, INVENTOR_2_0 = 0x0008, INVENTOR_2_1 = 0x0010, INVENTOR_2_5 = 0x0020, INVENTOR_2_6 = 0x0040, COIN_1_0 = 0x0080, COIN_2_0 = 0x0100, EXTENSION = 0x0200, COIN_2_2 = 0x0400, COIN_2_3 = 0x0800, COIN_2_4 = 0x1000, INVENTOR_5_0 = 0x2000, COIN_2_5 = 0x4000, COIN_3_0 = 0x8000, INVENTOR_6_0 = 0x10000, COIN_4_0 = 0x20000 }β look at those hex values go, they're literally powers of two marching up the whole way π
π Protected Types inherited from SoBase
enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }β just the two flags.
π Protected Attributes inherited from SoNode
SbUniqueId uniqueIdβ protected attribute, typeSbUniqueId.
π Protected Attributes inherited from SoFieldContainer
SbBool isBuiltInβ protected attribute, typeSbBool.
π Static Protected Attributes inherited from SoNode
static SbUniqueId nextUniqueId = 1β and yes, it starts at1, not0. note it πstatic int nextActionMethodIndex = 0β this one starts at0though.
β¨ Detailed Description β¨
so like, the whole point: the SoVertexShape class is the superclass for all vertex based shapes.
basically β and I'm quoting the vibe here β every polygon, line, or point based shape will inherit this class π«Ά it contains methods for organizing the normal cache, and it also holds the SoVertexShape::vertexProperty field, which can be used to set vertex data inside the node.
that's the whole flex. it's the mom of every vertex-y shape in the building π
πΈ Constructor & Destructor Documentation πΈ
πΈ SoVertexShape::SoVertexShape (void ) [protected]
Constructor.
πΈ SoVertexShape::~SoVertexShape () [protected], [virtual]
Destructor.
π MEMBER FUNCTION DOCUMENTATION π
okay bestie, this is the part where we go through every single method this class gives you. one by one. no skipping. we are eating the whole plate π½οΈβ¨
β¨ SoType SoVertexShape::getClassTypeId (void ) [static] β¨
static bestie energy β you don't need an actual object, you just knock on the class's door. it hands you back the SoType object that belongs to objects of this class. that's the whole job. simple. iconic. π
πΈ SoType SoVertexShape::getTypeId (void ) const [virtual] πΈ
gives you the type identification of an object derived from a class that inherits SoBase. what's it for? runtime type checking and "downward" casting, iykyk. it's the "wait, what are you actually" of the Coin universe π
- reimplemented from
SoShape - reimplemented in
SoFaceSet,SoIndexedFaceSet,SoIndexedLineSet,SoIndexedMarkerSet,SoIndexedPointSet,SoIndexedShape,SoIndexedTriangleStripSet,SoLineSet,SoMarkerSet,SoNonIndexedShape,SoPointSet,SoQuadMesh, andSoTriangleStripSet.
π const SoFieldData ** SoVertexShape::getFieldDataPtr (void ) [static], [protected] π
so this one is internal to the library, bestie β the docs literally say it's "not likely to be of interest to the application programmer". like, this is behind-the-scenes crew only, no front-row seats π
it returns the SoFieldData class that holds the info about the fields in this node.
π¦ const SoFieldData * SoVertexShape::getFieldData (void ) const [protected], [virtual] π¦
hands you a pointer to the class-wide field data storage object for this instance. and if there are no fields present? it returns NULL. that's it, that's the tea β
- reimplemented from
SoShape - reimplemented in
SoFaceSet,SoIndexedFaceSet,SoIndexedLineSet,SoIndexedMarkerSet,SoIndexedPointSet,SoIndexedShape,SoIndexedTriangleStripSet,SoLineSet,SoMarkerSet,SoNonIndexedShape,SoPointSet,SoQuadMesh, andSoTriangleStripSet.
β void SoVertexShape::initClass (void ) [static] β
no description, no notes, just vibes. she's mysterious like that. π«
π void SoVertexShape::notify (SoNotList * l) [virtual] π
pings all the auditors for this instance whenever changes get made. like a group chat notification but for your scene graph π£
- reimplemented from
SoShape - reimplemented in
SoIndexedLineSet, andSoIndexedPointSet.
π§ SbBool SoVertexShape::generateDefaultNormals (SoState * state, SoNormalBundle * bundle) [virtual] π§
heads up bestie: this API member is internal to the library, so it's "not likely to be of interest to the application programmer".
subclasses should override this one to generate default normals using the SoNormalBundle class. return TRUE if normals were actually generated, FALSE otherwise.
the default method just returns FALSE. respectfully, it does nothing π
this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
- reimplemented in
SoFaceSet,SoIndexedFaceSet,SoIndexedPointSet,SoIndexedTriangleStripSet,SoPointSet,SoQuadMesh, andSoTriangleStripSet.
π SbBool SoVertexShape::generateDefaultNormals (SoState * state, SoNormalCache * cache) [virtual] π
yep, same name, different signature β this is the overload, and she's the upgrade β¨
again: this API member is internal to the library, "not likely to be of interest to the application programmer".
subclasses should override this one to generate default normals using the SoNormalCache class. and bestie, this is more effective than using SoNormalGenerator. return TRUE if normals were generated, FALSE otherwise.
the default method just returns FALSE. she's not doing overtime π
ββοΈ
this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
- reimplemented in
SoFaceSet,SoIndexedFaceSet,SoIndexedPointSet,SoIndexedTriangleStripSet,SoPointSet,SoQuadMesh, andSoTriangleStripSet.
π void SoVertexShape::write (SoWriteAction * action) [virtual] π
the action method for SoWriteAction. it writes out a node object, plus any connected nodes, engines etc β but only if necessary. main character doesn't do extra work for no reason π
- reimplemented from
SoNode
π SbBool SoVertexShape::shouldGLRender (SoGLRenderAction * action) [protected], [virtual] π
bestie, internal alert: this API member is considered internal to the library, as it is not likely to be of interest to the application programmer.
- reimplemented from
SoShape
π§ void SoVertexShape::setNormalCache (SoState *const state, const int num, const SbVec3f * normals) [protected] π§
sets the normal cache to contain the normals specified by normals and num. and then β the important part β it forces cache dependencies on coordinates, shape hints and crease angle. no stale cache drama allowed, periodt π
π SoNormalCache * SoVertexShape::getNormalCache (void ) const [protected] π
returns the current normal cache, or NULL if there isn't one. that's it. short and sweet π¬
πͺ SoNormalCache * SoVertexShape::generateAndReadLockNormalCache (SoState *const state) [protected] πͺ
a convenience method that subclasses can use to return or create a normal cache. if the current cache isn't valid, she handles everything for you: unrefing the old cache, and pushing and popping the state so that element dependencies get created when the new cache is built. she's doing the most so you don't have to π«Ά
when you come back from this method, the normal cache will be read locked β so the caller should call readUnlockNormalCache() once the normals in the cache are no longer needed.
this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
since: Coin 2.0
π void SoVertexShape::getVertexData (SoState * state, const SoCoordinateElement *& coords, const SbVec3f *& normals, const SbBool neednormals) [protected] π
a convenience method that returns the current coordinate and normal element. this method is not part of the Open Inventor API. noted, logged, moving on π
π void SoVertexShape::readLockNormalCache (void ) [protected] π
read lock the normal cache. call this before fetching the normal cache (using getNormalCache()). and when the cached normals are no longer needed, readUnlockNormalCache() must be called. don't leave her locked, that's rude π₯Ί
you can also just use generateAndReadLockNormalCache() instead, iykyk.
this function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.
see also: readUnlockNormalCache()
since: Coin 2.0
π void SoVertexShape::readUnlockNormalCache (void ) [protected] π
read unlock the normal cache. call this when the read-locked cached normals are no longer needed. it's the release, the exhale, the "okay we're done here" π¬οΈ
see also: readLockNormalCache()
since: Coin 2.0
π§Έ MEMBER DATA DOCUMENTATION π§Έ
π SoSFNode SoVertexShape::vertexProperty π
if you set the vertexProperty field, it should be set with an SoVertexProperty node. otherwise? it will simply be ignored. no notes, no error, just ignored π
node types that inherit SoVertexShape will then get their coordinate data from the vertexProperty node instead of from the global traversal state.
now here's the juicy part β the vertexProperty field of SoVertexShape-derived nodes breaks somewhat with the basic design of Open Inventor, because its contents are not passed to the global state. why would they do that? to provide a simple path to highly optimized rendering of vertex based shapes. worth it, honestly π₯
see also: SoVertexProperty
since:
- Coin 1.0
- SGI Inventor 2.1
π AUTHOR π
generated automatically by Doxygen for Coin, straight from the source code. she didn't write herself, bestie, the robots did π€π
and that's a wrap on the whole page, fr fr π¬β¨ this was Version 4.0.10, stamped Thu Jun 25 2026 00:00:00, and yeah β it's page SoVertexShape(3). thank you for coming to my TED talk, go forth and render those vertices responsibly π¦π
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms