SoVRMLIndexedFaceSet(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

Hey bestie, welcome to SoVRMLIndexedFaceSet(3) πŸ’… β€” yes that's the page we're on, that's the header, we're folding it in like a lil' name tag.

So: the SoVRMLIndexedFaceSet class is the whole entire moment when it comes to representing a generic 3D shape. Generic. 3D. Shape. That's it, that's the job description, and it eats every time. πŸ”₯


✨ SYNOPSIS ✨

First, the ✨sacred incantation✨ β€” you gotta include the header, no cap:

#include <Inventor/VRMLnodes/SoVRMLIndexedFaceSet.h>

Also super important: it Inherits SoVRMLIndexedShape. So everything cute that SoVRMLIndexedShape has going on? It's also hers now. Generational wealth of member functions. πŸ‘‘


🌸 Public Member Functions 🌸

The ones this class owns outright:

  • virtual SoType getTypeId (void) const β€” hands you back the SoType of this thing. classic type-id check energy, she knows who she is.
  • SoVRMLIndexedFaceSet (void) β€” the constructor. birth. iconic. ✨
  • virtual void GLRender (SoGLRenderAction *action) β€” does the actual GL render for the given action. the main character's main character moment.
  • virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action) β€” tallies up primitives for the action you hand it.
  • virtual SbBool generateDefaultNormals (SoState *s, SoNormalBundle *nb) β€” generates default normals, takes an SoState *s and an SoNormalBundle *nb, returns an SbBool.
  • virtual SbBool generateDefaultNormals (SoState *state, SoNormalCache *nc) β€” yeah it's the same name again but with SoState *state and SoNormalCache *nc instead. overloaded bestie, she contains multitudes. ✨

πŸ¦‹ Public Member Functions inherited from SoVRMLVertexShape

Passed down like a family recipe:

  • virtual void doAction (SoAction *action) β€” runs the action.
  • virtual void getBoundingBox (SoGetBoundingBoxAction *action) β€” bounding box, delivered to the action.
  • virtual void callback (SoCallbackAction *action) β€” callback handling for the action.
  • virtual void pick (SoPickAction *action) β€” picking, for the action.

πŸ¦‹ Public Member Functions inherited from SoVRMLGeometry

  • virtual void search (SoSearchAction *action) β€” searching, with the action.
  • virtual void copyContents (const SoFieldContainer *from, SbBool copyConn) β€” copies contents over from from, with copyConn deciding the connection-copying situation.

πŸ¦‹ Public Member Functions inherited from SoShape

  • virtual SbBool affectsState (void) const β€” tells you whether this affects state, as an SbBool.
  • virtual void rayPick (SoRayPickAction *action) β€” ray picking, for the action.
  • const SoBoundingBoxCache * getBoundingBoxCache (void) const β€” returns a pointer to the SoBoundingBoxCache. const, because she's not gonna let you mess with her.

πŸ¦‹ Public Member Functions inherited from SoNode

The whole squad:

  • void setOverride (const SbBool state) β€” sets override to state.
  • SbBool isOverride (void) const β€” are we overriding? returns SbBool.
  • void setNodeType (const NodeType type) β€” sets the node type to type.
  • NodeType getNodeType (void) const β€” returns the NodeType.
  • virtual SoNode * copy (SbBool copyconnections=0) const β€” returns a copied SoNode *, with copyconnections=0 by default.
  • virtual void GLRenderBelowPath (SoGLRenderAction *action) β€” GL renders below the path.
  • virtual void GLRenderInPath (SoGLRenderAction *action) β€” GL renders in the path.
  • virtual void GLRenderOffPath (SoGLRenderAction *action) β€” GL renders off the path. three paths, three moods, all valid. πŸ’…
  • virtual void getMatrix (SoGetMatrixAction *action) β€” grabs the matrix via the action.
  • virtual void handleEvent (SoHandleEventAction *action) β€” handles the event in the action.
  • virtual void write (SoWriteAction *action) β€” writes, using the action.
  • virtual void audioRender (SoAudioRenderAction *action) β€” audio render, with the action.
  • virtual void grabEventsSetup (void) β€” sets up event grabbing.
  • virtual void grabEventsCleanup (void) β€” cleans up event grabbing.
  • virtual void startNotify (void) β€” kicks off notification.
  • uint32_t getNodeId (void) const β€” returns the node id as a uint32_t.
  • virtual void writeInstance (SoOutput *out) β€” writes the instance out to out.
  • virtual SoNode * addToCopyDict (void) const β€” adds itself to the copy dict, returns SoNode *.
  • virtual SoFieldContainer * copyThroughConnection (void) const β€” copies through the connection, returns SoFieldContainer *.

πŸ¦‹ Public Member Functions inherited from SoFieldContainer

  • void setToDefaults (void) β€” resets everything to defaults.
  • SbBool hasDefaultValues (void) const β€” does it have default values? SbBool says maybe.
  • SbBool fieldsAreEqual (const SoFieldContainer *container) const β€” are the fields equal to container's?
  • void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0) β€” copies field values from container, copyconnections=0 by default.
  • SbBool set (const char *const fielddata) β€” sets from fielddata.
  • void get (SbString &fielddata) β€” gets into fielddata.
  • virtual int getFields (SoFieldList &l) const β€” fills l with fields, returns an int.
  • virtual int getAllFields (SoFieldList &l) const β€” ALL the fields, into l.
  • virtual SoField * getField (const SbName &name) const β€” returns the SoField * named name.
  • virtual SoField * getEventIn (const SbName &name) const β€” the event-in named name.
  • virtual SoField * getEventOut (const SbName &name) const β€” the event-out named name.
  • SbBool getFieldName (const SoField *const field, SbName &name) const β€” name of field, into name.
  • SbBool enableNotify (const SbBool flag) β€” turns notify on/off with flag.
  • SbBool isNotifyEnabled (void) const β€” is notify on? SbBool, bestie.
  • SbBool set (const char *fielddata, SoInput *in) β€” the SoInput *in version of set.
  • void get (SbString &fielddata, SoOutput *out) β€” the SoOutput *out version of get.
  • virtual SbBool validateNewFieldValue (SoField *field, void *newval) β€” validates newval for field.
  • virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0) β€” adds a write reference, isfromfield=0 by default.
  • SbBool getIsBuiltIn (void) const β€” is it built in? ✨
  • void setUserData (void *userdata) const β€” attaches userdata.
  • void * getUserData (void) const β€” gives the user data back as void *.

πŸ¦‹ Public Member Functions inherited from SoBase

  • void ref (void) const β€” increments the ref count.
  • void unref (void) const β€” decrements the ref count.
  • void unrefNoDelete (void) const β€” decrements without deleting. spicy.
  • int32_t getRefCount (void) const β€” ref count as int32_t.
  • void touch (void) β€” touch. πŸ‘€
  • SbBool isOfType (SoType type) const β€” is it of type?
  • virtual SbName getName (void) const β€” returns the SbName.
  • virtual void setName (const SbName &newname) β€” renames it to newname.
  • void addAuditor (void *const auditor, const SoNotRec::Type type) β€” adds auditor of type.
  • void removeAuditor (void *const auditor, const SoNotRec::Type type) β€” removes auditor of type.
  • const SoAuditorList & getAuditors (void) const β€” returns the SoAuditorList &.
  • SbBool shouldWrite (void) β€” should it write? bestie it depends.
  • void assertAlive (void) const β€” asserts it's alive. literally a wellness check. πŸ’€

⭐ Static Public Member Functions ⭐

  • static SoType getClassTypeId (void) β€” the class type id, statically.
  • static void initClass (void) β€” initializes the class. do not skip her.

🧚 Static Public Member Functions inherited from SoVRMLIndexedShape

  • static SoType getClassTypeId (void)
  • static void initClass (void)

🧚 Static Public Member Functions inherited from SoVRMLVertexShape

  • static SoType getClassTypeId (void)
  • static void initClass (void)

🧚 Static Public Member Functions inherited from SoVRMLGeometry

  • static SoType getClassTypeId (void)
  • static void initClass (void)

🧚 Static Public Member Functions inherited from SoShape

  • static SoType getClassTypeId (void)
  • static void initClass (void)
  • static void getScreenSize (SoState *const state, const SbBox3f &boundingbox, SbVec2s &rectsize) β€” screen size from state and boundingbox, into rectsize.
  • static float getDecimatedComplexity (SoState *state, float complexity) β€” decimated complexity, returns a float.

🧚 Static Public Member Functions inherited from SoNode

  • static uint32_t getCompatibilityTypes (const SoType &nodetype) β€” compatibility types for nodetype.
  • static SoType getClassTypeId (void)
  • static SoNode * getByName (const SbName &name) β€” node named name.
  • static int getByName (const SbName &name, SoNodeList &l) β€” fills l with the ones named name, returns an int.
  • static void initClass (void)
  • static void initClasses (void) β€” plural. the whole class family. 🌈
  • static uint32_t getNextNodeId (void) β€” next node id, uint32_t.
  • static int getActionMethodIndex (const SoType type) β€” action method index for 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)
the little S at the end? that's the static-entry-point glow-up, bestie. ✨

🧚 Static Public Member Functions inherited from SoFieldContainer

  • static void initClass (void)
  • static SoType getClassTypeId (void)
  • static void initCopyDict (void) β€” initializes the copy dict.
  • static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy) β€” registers copy as a copy of orig.
  • static SoFieldContainer * checkCopy (const SoFieldContainer *orig) β€” checks for a copy of orig.
  • static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections) β€” finds the copy of orig, with copyconnections deciding the vibe.
  • static void copyDone (void) β€” copy's done. wrap it up. πŸŽ€

🧚 Static Public Member Functions inherited from SoBase

  • static void initClass (void)
  • static SoType getClassTypeId (void)
  • static void addName (SoBase *const base, const char *const name) β€” adds name to base.
  • static void removeName (SoBase *const base, const char *const name) β€” takes name off base.
  • static void incrementCurrentWriteCounter (void) β€” bumps the current write counter.
  • static void decrementCurrentWriteCounter (void) β€” lowers it back down.
  • static SoBase * getNamedBase (const SbName &name, SoType type) β€” the base named name of type.
  • static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type) β€” all of them, into baselist.
  • static SbBool read (SoInput *in, SoBase *&base, SoType expectedtype) β€” reads from in into base, expecting expectedtype.
  • static void setInstancePrefix (const SbString &c) β€” sets the instance prefix to c.
  • static void setTraceRefs (SbBool trace) β€” toggles ref tracing with trace.
  • static SbBool getTraceRefs (void) β€” are refs being traced?
  • static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname) β€” connects a route from fromnodename.fromfieldname to tonodename.tofieldname.
  • static SbBool readRoute (SoInput *in) β€” reads a route from in.

πŸ’œ Public Attributes πŸ’œ

  • SoSFBool ccw β€” counter-clockwise flag, as an SoSFBool.
  • SoSFBool solid β€” solid flag.
  • SoSFBool convex β€” convex flag.
  • SoSFFloat creaseAngle β€” the crease angle, as an SoSFFloat.

πŸ“ Public Attributes inherited from SoVRMLIndexedShape

  • SoMFInt32 coordIndex
  • SoMFInt32 colorIndex
  • SoMFInt32 normalIndex
  • SoMFInt32 texCoordIndex

πŸ“ Public Attributes inherited from SoVRMLVertexShape

  • SoSFNode coord
  • SoSFNode texCoord
  • SoSFNode normal
  • SoSFNode color
  • SoSFBool colorPerVertex
  • SoSFBool normalPerVertex

πŸŽ€ Protected Member Functions πŸŽ€

For the inner circle only, bestie:

  • virtual const SoFieldData * getFieldData (void) const β€” returns the SoFieldData *, const.
  • virtual ~SoVRMLIndexedFaceSet () β€” the destructor. she has to go sometime. 😭
  • virtual void generatePrimitives (SoAction *action) β€” generates primitives for the action.

🌸 Protected Member Functions inherited from SoVRMLIndexedShape

  • SoVRMLIndexedShape (void) β€” constructor.
  • virtual ~SoVRMLIndexedShape () β€” destructor.
  • virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center) β€” computes the bounding box into box and center.
  • SbBool getVertexData (SoState *state, const SoCoordinateElement *&coords, const SbVec3f *&normals, const int32_t *&cindices, const int32_t *&nindices, const int32_t *&tindices, const int32_t *&mindices, int &numcindices, const SbBool neednormals, SbBool &normalcacheused) β€” the big one. grabs vertex data: state, coords, normals, cindices, nindices, tindices, mindices, numcindices, neednormals, and normalcacheused. all of it. every crumb. 🫢

🌸 Protected Member Functions inherited from SoVRMLVertexShape

  • SoVRMLVertexShape (void) β€” constructor.
  • virtual ~SoVRMLVertexShape () β€” destructor.
  • virtual SbBool shouldGLRender (SoGLRenderAction *action) β€” should this GL render for action?
  • void setNormalCache (SoState *s, int numNormals, SbVec3f *normals) β€” sets the normal cache with numNormals and normals.
  • SoNormalCache * getNormalCache (void) const β€” returns the SoNormalCache *.
  • SoNormalCache * generateAndReadLockNormalCache (SoState *const state) β€” generates and read-locks the normal cache for state.
  • void getVertexData (SoState *state, const SoCoordinateElement *&coords, const SbVec3f *&normals, const SbBool neednormals) β€” the shorter getVertexData, with state, coords, normals and neednormals.
  • void readLockNormalCache (void) β€” read-locks the normal cache.
  • void readUnlockNormalCache (void) β€” read-unlocks it. release her. πŸ’…

🌸 Protected Member Functions inherited from SoVRMLGeometry

  • SoVRMLGeometry (void) β€” constructor.
  • virtual ~SoVRMLGeometry () β€” destructor.
  • void setupShapeHints (SoState *state, const SbBool ccw, const SbBool solid) β€” sets up shape hints for state, ccw and solid.
  • virtual SoChildList * getChildren (void) const β€” returns the SoChildList *.

and that's part 1 of 4, so don't you dare close the tab β€” there's SO much more coming and it's only getting cuter 😭✨

πŸ¦‹ Protected Member Functions (the inherited ones β€” SoShape edition)

okay so these aren't yours, bestie, they're inherited β€” you get them for free when you subclass. you don't call them from your app code, they're the plumbing your own overrides get to lean on. πŸ’…

  • SoShape (void) β€” constructor. takes nothing, returns nothing, iconic behaviour honestly.
  • virtual ~SoShape () β€” destructor, and yeah it's virtual, which is the correct and polite way to do destructors around here.
  • float getComplexityValue (SoAction *action) β€” hands you back a complexity value as a float, and it wants the SoAction *action you're running under.
  • void beginSolidShape (SoGLRenderAction *action) β€” the "we're opening a solid shape now" opener, takes the SoGLRenderAction *action.
  • void endSolidShape (SoGLRenderAction *action) β€” and this is the matching closer. bookends, we love them. ✨
  • void GLRenderBoundingBox (SoGLRenderAction *action) β€” renders the bounding box, SoGLRenderAction *action in hand.
  • SbBool shouldPrimitiveCount (SoGetPrimitiveCountAction *action) β€” yes/no (SbBool) on whether to count primitives, given an SoGetPrimitiveCountAction *action.
  • SbBool shouldRayPick (SoRayPickAction *const action) β€” yes/no on whether the ray pick happens. note the *const on that pointer, she's particular. πŸ™ˆ
  • void computeObjectSpaceRay (SoRayPickAction *const action) β€” computes the object-space ray. this is the no-matrix version.
  • void computeObjectSpaceRay (SoRayPickAction *const action, const SbMatrix &matrix) β€” the overload! same name, but now with a const SbMatrix &matrix along for the ride.
  • virtual SoDetail * createTriangleDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3, SoPickedPoint *pp) β€” builds and returns an SoDetail * for a triangle. takes the action, three vertices v1, v2, v3, and the SoPickedPoint *pp.
  • virtual SoDetail * createLineSegmentDetail (SoRayPickAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, SoPickedPoint *pp) β€” same energy, but for a line segment: two vertices and the picked point.
  • virtual SoDetail * createPointDetail (SoRayPickAction *action, const SoPrimitiveVertex *v, SoPickedPoint *pp) β€” and for a single point. one vertex v, one SoPickedPoint *pp.
  • void invokeTriangleCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2, const SoPrimitiveVertex *const v3) β€” fires off the triangle callbacks. three const SoPrimitiveVertex *const arguments, so much const, so much commitment. πŸ’€
  • void invokeLineSegmentCallbacks (SoAction *const action, const SoPrimitiveVertex *const v1, const SoPrimitiveVertex *const v2) β€” line segment callbacks, two vertices this time.
  • void invokePointCallbacks (SoAction *const action, const SoPrimitiveVertex *const v) β€” point callbacks. one vertex. minimalism. πŸŽ€
  • void beginShape (SoAction *const action, const TriangleShape shapetype, SoDetail *const detail=NULL) β€” opens a shape with a TriangleShape shapetype, and heads up, detail defaults to NULL.
  • void shapeVertex (const SoPrimitiveVertex *const v) β€” feeds a vertex in, as a const SoPrimitiveVertex *const v.
  • void endShape (void) β€” closes the shape. no arguments, just vibes and closure.
  • void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoTextureCoordinateElement *const tce, const float s, const float t, const SbVec3f &normal) β€” generates a vertex from a point, a useTexFunc flag, a texture coordinate element, s and t, and a normal. no r here.
  • void generateVertex (SoPrimitiveVertex *const pv, const SbVec3f &point, const SbBool useTexFunc, const SoTextureCoordinateElement *const tce, const float s, const float t, const float r, const SbVec3f &normal) β€” the other overload, and the difference is that extra const float r. that's it. that's the whole difference. 🫢
  • SbBool startVertexArray (SoGLRenderAction *action, const SoCoordinateElement *coords, const SbVec3f *pervertexnormals, const SbBool texpervertex, const SbBool colorpervertex) β€” kicks off the vertex array with coords, per-vertex normals, and the texpervertex / colorpervertex flags.
  • void finishVertexArray (SoGLRenderAction *action, const SbBool vbo, const SbBool normpervertex, const SbBool texpervertex, const SbBool colorpervertex) β€” wraps the vertex array up. note the vbo flag sitting right there in the parameter list.

🌸 Static Protected Member Functions

  • static const SoFieldData ** getFieldDataPtr (void) β€” returns the field data pointer, as a const SoFieldData **. static, so it's a class-level thing.

πŸ’œ Static Protected Member Functions inherited from SoVRMLIndexedShape

  • static const SoFieldData ** getFieldDataPtr (void) β€” same signature, different ancestor. she's in the family tree too. 🌈

πŸ’œ Static Protected Member Functions inherited from SoVRMLVertexShape

  • static const SoFieldData ** getFieldDataPtr (void) β€” yep. same one again.

πŸ’œ Static Protected Member Functions inherited from SoVRMLGeometry

  • static const SoFieldData ** getFieldDataPtr (void) β€” and again, bestie, it goes all the way up.

πŸ’œ Static Protected Member Functions inherited from SoShape

  • static const SoFieldData ** getFieldDataPtr (void) β€” still the same signature, still static.

πŸ’œ Static Protected Member Functions inherited from SoNode

  • static const SoFieldData ** getFieldDataPtr (void) β€” the field data pointer, once more with feeling.
  • static void setNextActionMethodIndex (int index) β€” sets the next action method index to an int index.
  • static int getNextActionMethodIndex (void) β€” reads that index back out as an int.
  • static void incNextActionMethodIndex (void) β€” increments it. no arguments, it just bumps the thing. ✨
  • static void setCompatibilityTypes (const SoType &nodetype, const uint32_t bitmask) β€” sets compatibility types from an SoType and a uint32_t bitmask.

πŸ’œ Static Protected Member Functions inherited from SoBase

  • static uint32_t getCurrentWriteCounter (void) β€” gives you the current write counter as a uint32_t.
  • static void staticDataLock (void) β€” locks the static data. no args.
  • static void staticDataUnlock (void) β€” and unlocks it. they come as a pair, always. πŸ”

πŸ’œ Protected Member Functions inherited from SoNode

  • SoNode (void) β€” constructor.
  • virtual ~SoNode () β€” virtual destructor, correct as always.
  • virtual SbBool readInstance (SoInput *in, unsigned short flags) β€” reads an instance, takes an SoInput *in and an unsigned short flags, gives you back an SbBool.

πŸ’œ Protected Member Functions inherited from SoFieldContainer

  • SoFieldContainer (void) β€” constructor.
  • ~SoFieldContainer () β€” destructor. (not virtual this time, just so you know. πŸ‘€)

πŸ’œ Protected Member Functions inherited from SoBase

  • SoBase (void) β€” constructor.
  • virtual ~SoBase () β€” virtual destructor.
  • virtual void destroy (void) β€” the destroy hook, virtual, no arguments.
  • SbBool hasMultipleWriteRefs (void) const β€” a const member returning an SbBool about multiple write refs.
  • SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const β€” writes the header, takes out, isgroup, isengine, and yes it's const.
  • void writeFooter (SoOutput *out) const β€” writes the footer. also const. balance. 🧚
  • virtual const char * getFileFormatName (void) const β€” hands back the file format name as a const char *, and it's const too.

πŸ‘‘ Additional Inherited Members

🌈 Public Types inherited from SoVRMLVertexShape

  • enum Binding { OVERALL = SoMaterialBindingElement::OVERALL, PER_PART = SoMaterialBindingElement::PER_PART, PER_PART_INDEXED = SoMaterialBindingElement::PER_PART_INDEXED, PER_FACE = SoMaterialBindingElement::PER_FACE, PER_FACE_INDEXED = SoMaterialBindingElement::PER_FACE_INDEXED, PER_VERTEX = SoMaterialBindingElement::PER_VERTEX, PER_VERTEX_INDEXED = SoMaterialBindingElement::PER_VERTEX_INDEXED } β€” seven binding modes, each one mapped straight onto its SoMaterialBindingElement twin. no cap. πŸ’…

🌈 Public Types inherited from SoShape

  • enum TriangleShape { TRIANGLE_STRIP, TRIANGLE_FAN, TRIANGLES, POLYGON, QUADS, QUAD_STRIP, POINTS, LINES, LINE_STRIP } β€” nine shapes, and yes, POLYGON is right there in the middle living her best life.

🌈 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 } β€” the whole node-type family tree as bit flags, from 0x0000 all the way up to 0x4000. this one's giving ✨hexadecimal✨.

🌈 Protected Types inherited from SoBase

  • enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 } β€” just two flags. small, but mighty. πŸŽ€

πŸ“ Protected Attributes inherited from SoNode

  • uint32_t uniqueId β€” a uint32_t called uniqueId. she's unique, obviously.

πŸ“ Protected Attributes inherited from SoFieldContainer

  • SbBool isBuiltIn β€” an SbBool named isBuiltIn.

⭐ Static Protected Attributes inherited from SoNode

  • static uint32_t nextUniqueId = 0 β€” static, uint32_t, and it starts at 0.
  • static int nextActionMethodIndex = 0 β€” static int, also starting at 0. twins fr fr. πŸ’–

Detailed Description βœ¨πŸ’–

Okay bestie, listen up β€” the SoVRMLIndexedFaceSet class is THE blueprint for a generic 3D shape. It's giving "I contain multitudes" but make it polygons. πŸ¦‹

The detailed class documentation is taken verbatim from the VRML97 standard (ISO/IEC 14772-1:1997). It is copyright The Web3D Consortium, and is used by permission of the Consortium:

IndexedFaceSet {
  eventIn       MFInt32 set_colorIndex
  eventIn       MFInt32 set_coordIndex
  eventIn       MFInt32 set_normalIndex
  eventIn       MFInt32 set_texCoordIndex
  exposedField  SFNode  color             NULL
  exposedField  SFNode  coord             NULL
  exposedField  SFNode  normal            NULL
  exposedField  SFNode  texCoord          NULL
  field         SFBool  ccw               TRUE
  field         MFInt32 colorIndex        []        # [-1,)
  field         SFBool  colorPerVertex    TRUE
  field         SFBool  convex            TRUE
  field         MFInt32 coordIndex        []        # [-1,)
  field         SFFloat creaseAngle       0         # [0,)
  field         MFInt32 normalIndex       []        # [-1,)
  field         SFBool  normalPerVertex   TRUE
  field         SFBool  solid             TRUE
  field         MFInt32 texCoordIndex     []        # [-1,)
}

So the IndexedFaceSet node is literally a 3D shape formed by constructing faces (polygons) from vertices listed in the coord field. The coord field contains a Coordinate node that defines the 3D vertices referenced by the coordIndex field. IndexedFaceSet uses the indices in its coordIndex field to specify the polygonal faces by indexing into the coordinates in the Coordinate node. An index of "-1" indicates that the current face has ended and the next one begins. The last face may be (but does not have to be) followed by a "-1" index. If the greatest index in the coordIndex field is N, the Coordinate node shall contain N+1 coordinates (indexed as 0 to N). Each face of the IndexedFaceSet shall have:

  • at least three non-coincident vertices;
  • vertices that define a planar polygon;
  • vertices that define a non-self-intersecting polygon.
Otherwise, The results are undefined. 😭 Not a vibe. Don't do it.

The IndexedFaceSet node is specified in the local coordinate system and is affected by the transformations of its ancestors. (Ancestry.com but for 3D transforms, periodt.)

Descriptions of the coord, normal, and texCoord fields are provided in the SoVRMLCoordinate, SoVRMLNormal, and SoVRMLTextureCoordinate nodes, respectively.

Details on lighting equations and the interaction between color field, normal field, textures, materials, and geometries are provided in 4.14, Lighting model.


If the color field is not NULL, it shall contain a Color node whose colours are applied to the vertices or faces of the IndexedFaceSet as follows:

  • If colorPerVertex is FALSE, colours are applied to each face, as follows:
    • If the colorIndex field is not empty, then one colour is used for each face of the IndexedFaceSet. There shall be at least as many indices in the colorIndex field as there are faces in the IndexedFaceSet. If the greatest index in the colorIndex field is N, then there shall be N+1 colours in the Color node. The colorIndex field shall not contain any negative entries.
    • If the colorIndex field is empty, then the colours in the Color node are applied to each face of the IndexedFaceSet in order. There shall be at least as many colours in the Color node as there are faces.
  • If colorPerVertex is TRUE, colours are applied to each vertex, as follows:
    • If the colorIndex field is not empty, then colours are applied to each vertex of the IndexedFaceSet in exactly the same manner that the coordIndex field is used to choose coordinates for each vertex from the Coordinate node. The colorIndex field shall contain at least as many indices as the coordIndex field, and shall contain end-of-face markers (-1) in exactly the same places as the coordIndex field. If the greatest index in the colorIndex field is N, then there shall be N+1 colours in the Color node.
    • If the colorIndex field is empty, then the coordIndex field is used to choose colours from the Color node. If the greatest index in the coordIndex field is N, then there shall be N+1 colours in the Color node.

If the color field is NULL, the geometry shall be rendered normally using the Material and texture defined in the Appearance node (see 4.14, Lighting model, for details http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.6.5).

If the normal field is not NULL, it shall contain a Normal node whose normals are applied to the vertices or faces of the IndexedFaceSet in a manner exactly equivalent to that described above for applying colours to vertices/faces (where normalPerVertex corresponds to colorPerVertex and normalIndex corresponds to colorIndex). If the normal field is NULL, the browser shall automatically generate normals, using creaseAngle to determine if and how normals are smoothed across shared vertices (see 4.6.3.5, Crease angle field).

If the texCoord field is not NULL, it shall contain a TextureCoordinate node. The texture coordinates in that node are applied to the vertices of the IndexedFaceSet as follows: If the texCoordIndex field is not empty, then it is used to choose texture coordinates for each vertex of the IndexedFaceSet in exactly the same manner that the coordIndex field is used to choose coordinates for each vertex from the Coordinate node. The texCoordIndex field shall contain at least as many indices as the coordIndex field, and shall contain end-of-face markers (-1) in exactly the same places as the coordIndex field. If the greatest index in the texCoordIndex field is N, then there shall be N+1 texture coordinates in the TextureCoordinate node.

If the texCoordIndex field is empty, then the coordIndex array is used to choose texture coordinates from the TextureCoordinate node. If the greatest index in the coordIndex field is N, then there shall be N+1 texture coordinates in the TextureCoordinate node. If the texCoord field is NULL, a default texture coordinate mapping is calculated using the local coordinate system bounding box of the shape. The longest dimension of the bounding box defines the S coordinates, and the next longest defines the T coordinates. If two or all three dimensions of the bounding box are equal, ties shall be broken by choosing the X, Y, or Z dimension in that order of preference. The value of the S coordinate ranges from 0 to 1, from one end of the bounding box to the other. The T coordinate ranges between 0 and the ratio of the second greatest dimension of the bounding box to the greatest dimension. Figure 6.10 illustrates the default texture coordinates for a simple box shaped IndexedFaceSet with an X dimension twice as large as the Z dimension and four times as large as the Y dimension. Figure 6.11 illustrates the original texture image used on the IndexedFaceSet used in Figure 6.10.

Figure 6.10
Figure 6.11

Subclause 4.6.3, Shapes and geometry (http://www.web3d.org/x3d/specifications/vrml/ISO-IEC-14772-VRML97/part1/concepts.html#4.6.5), provides a description of the ccw, solid, convex, and creaseAngle fields.


Constructor & Destructor Documentation πŸŽ€πŸ«Ά

SoVRMLIndexedFaceSet::SoVRMLIndexedFaceSet (void )

Constructor. ✨

References ccw, convex, creaseAngle, solid, and SoVRMLIndexedFaceSet().

Referenced by getFieldData(), and SoVRMLIndexedFaceSet().

SoVRMLIndexedFaceSet::~SoVRMLIndexedFaceSet () [protected], [virtual]

Destructor. πŸ’… (She's protected and virtual β€” iconic behavior, no notes.)

πŸ’… Member Function Documentation πŸ’…

SoType SoVRMLIndexedFaceSet::getTypeId(void) const β€” [virtual] ✨

Okay so this hands you back the type identification of literally any object that inherits from SoBase. What's it for? Run-time type checking and "downward" casting, periodt. That's the whole vibe.

Usage example, bestie, take notes:

void foo(SoNode * node)
{
  if (node->getTypeId() == SoFile::getClassTypeId()) {
    SoFile * filenode = (SoFile *)node;  // safe downward cast, knows the type
  }
  else if (node->getTypeId().isOfType(SoGroup::getClassTypeId())) {
    SoGroup * group = (SoGroup *)node;  // safe downward cast, knows the type
  }
}

Now for the application programmers out there who wanna extend the library with brand new nodes, engines, nodekits, draggers or whatever else: you have to override this method in all your subclasses. Not optional, no skipping. This usually happens as part of setting up the full type system for your extension classes, which you normally do by using the pre-defined macros available through, for instance, Inventor/nodes/SoSubNode.h (that's SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. 🫢

Wanna know more about writing Coin extensions? Go read the class documentation of the toplevel superclasses for the various class groups. It's giving homework but it's giving useful homework.

Reimplemented from SoVRMLIndexedShape.


const SoFieldData * SoVRMLIndexedFaceSet::getFieldData(void) const β€” [protected], [virtual] πŸ”’

Returns a pointer to the class-wide field data storage object for this instance. If there are no fields present, it hands you NULL. That's it, that's the function.

Reimplemented from SoVRMLIndexedShape.

πŸ”— References: SoVRMLIndexedFaceSet().


void SoVRMLIndexedFaceSet::GLRender(SoGLRenderAction * action) β€” [virtual] 🎨

This is the action method for the SoGLRenderAction, and it gets called during rendering traversals. Any node that influences the rendering state in any way, or that wants to yeet geometry primitives at OpenGL, overrides this method. That's the assignment. πŸ’…

Reimplemented from SoVRMLVertexShape.

πŸ”— References: ccw, SoVRMLIndexedShape::coordIndex, SoShape::finishVertexArray(), SoGLRenderAction::getCacheContext(), SoAction::getState(), SoVRMLIndexedShape::getVertexData(), SoVRMLVertexShape::GLRender(), SoState::pop(), SoState::push(), SoVRMLVertexShape::readUnlockNormalCache(), SoVRMLGeometry::setupShapeHints(), SoVRMLVertexShape::shouldGLRender(), and SoShape::startVertexArray().


void SoVRMLIndexedFaceSet::getPrimitiveCount(SoGetPrimitiveCountAction * action) β€” [virtual] πŸ”’

Action method for the SoGetPrimitiveCountAction.

It counts up the number of triangle, line segment and point primitives for the node and adds all of those to the counters of the action. Math girl summer. 🌸

Nodes that influence how geometry nodes calculate their primitive count also override this method, so they can change the relevant state variables.

Reimplemented from SoShape.

πŸ”— References: SoGetPrimitiveCountAction::addNumTriangles(), SoGetPrimitiveCountAction::canApproximateCount(), SoVRMLIndexedShape::coordIndex, and SoShape::shouldPrimitiveCount().


SbBool SoVRMLIndexedFaceSet::generateDefaultNormals(SoState * s, SoNormalBundle * nb) β€” [virtual] πŸ¦‹

Heads up: this API member is considered internal to the library, because it's not likely to be of interest to the application programmer. iykyk.

Subclasses should override this method to generate default normals using the SoNormalBundle class. Return TRUE if normals were generated, FALSE otherwise. Simple as.

Default method returns FALSE.

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Reimplemented from SoVRMLVertexShape.


SbBool SoVRMLIndexedFaceSet::generateDefaultNormals(SoState * s, SoNormalCache * nc) β€” [virtual] πŸ¦‹

Also internal to the library, so again, not likely to be of interest to the application programmer. πŸ™ˆ

Subclasses should override this method to generate default normals using the SoNormalCache class. This one is more effective than using SoNormalGenerator. Return TRUE if normals were generated, FALSE otherwise.

Default method just returns FALSE.

This function is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API.

Reimplemented from SoVRMLVertexShape.

πŸ”— References: SoVRMLVertexShape::coord, SoVRMLIndexedShape::coordIndex, SoMField::getNum(), SoMFVec3f::getValues(), and SoVRMLCoordinate::point.


void SoVRMLIndexedFaceSet::generatePrimitives(SoAction * action) β€” [protected], [virtual] πŸŽ€

This method implements action behavior for shape nodes for SoCallbackAction. It gets invoked from SoShape::callback(). (And listen: subclasses should not override SoNode::callback(). Don't do it. 🚫)

The subclass implementations use the convenience methods SoShape::beginShape(), SoShape::shapeVertex(), and SoShape::endShape(), with SoDetail instances, to pass the primitives making up the shape back to the caller.

Implements SoShape.

πŸ”— References: SoShape::beginShape(), SoVRMLIndexedShape::coordIndex, SoVRMLVertexShape::doAction(), SoShape::endShape(), SoAction::getState(), SoVRMLIndexedShape::getVertexData(), SoFaceDetail::incFaceIndex(), SoState::pop(), SoState::push(), SoVRMLVertexShape::readUnlockNormalCache(), SoPointDetail::setCoordinateIndex(), SoPrimitiveVertex::setDetail(), SoPointDetail::setMaterialIndex(), SoPrimitiveVertex::setMaterialIndex(), SoPrimitiveVertex::setNormal(), SoPointDetail::setNormalIndex(), SoPrimitiveVertex::setPoint(), SoPointDetail::setTextureCoordIndex(), SoPrimitiveVertex::setTextureCoords(), and SoShape::shapeVertex().


πŸ‘‘ Member Data Documentation πŸ‘‘

SoSFBool SoVRMLIndexedFaceSet::ccw πŸŒ€

Specifies if vertex ordering is counterclockwise. Default value is TRUE.

Referenced by GLRender(), and SoVRMLIndexedFaceSet().


SoSFBool SoVRMLIndexedFaceSet::solid 🧊

Can be used to enable backface culling. Default value is TRUE.

Referenced by SoVRMLIndexedFaceSet().


SoSFBool SoVRMLIndexedFaceSet::convex πŸ”₯

Specifies if all polygons are convex. Default value is TRUE.

Referenced by SoVRMLIndexedFaceSet().


SoSFFloat SoVRMLIndexedFaceSet::creaseAngle πŸ“

Specifies the crease angle for the generated normals. Default value is 0.0.

Referenced by SoVRMLIndexedFaceSet().


🌈 Author 🌈

Generated automatically by Doxygen for Coin from the source code. Not a human, not a girlie, just a doc generator doing its lil thing. ✨


And that's a wrap on SoVRMLIndexedFaceSet(3), bestie!! 🫢 This whole thing came out of Coin Version 2.5.0 and the page is filed under SoVRMLIndexedFaceSet(3). Go build something iconic with it, ily, bye!! πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from