SoMFNode(3)
πΈ SoMFNode(3) β Coin πΈ
okay so bestie, this is the SoMFNode(3) page from Coin, and it's giving "container for nodes" main character energy. Buckle up, it's a two-parter π
π NAME π
SoMFNode β the class that is literally a container for nodes. That's the whole job description, and it eats. π
β¨ SYNOPSIS β¨
First things first, you gotta pull it in:
#include <Inventor/fields/SoMFNode.h>
And it Inherits SoMField β that's the family tree, iykyk π§¬
π«Ά Public Member Functions π«Ά
the actual roster, one by one, no skips:
virtual SoType getTypeId (void) constβ hands you back the type id, virtual edition β¨virtual void copyFrom (const SoField &field)β copy everything over from another fieldconst SoMFNode & operator= (const SoMFNode &field)β assignment operator, but for a whole otherSoMFNodevirtual SbBool isSame (const SoField &field) constβ are you and that field the same? πSoNode * operator[] (const int idx) constβ index in, node pointer outconst SoNode ** getValues (const int start) constβ grab the values array, starting atstartint find (SoNode *value, SbBool addifnotfound=FALSE)β go hunt for a node, andaddifnotfounddefaults toFALSEπΈvoid setValues (const int start, const int num, const SoNode **newvals)β setnumvalues starting atstart, sourced fromnewvalsvoid set1Value (const int idx, SoNode *value)β set exactly one value, atidxvoid setValue (SoNode *value)β set the value, singularSoNode * operator= (SoNode *val)β assignment operator, single node pointer styleSbBool operator== (const SoMFNode &field) constβ equality check π«SbBool operator!= (const SoMFNode &field) constβ inequality check π«SoNode ** startEditing (void)β kick off editing and get the pointer backvoid finishEditing (void)β okay we're done editing, wrap it upvirtual void fixCopy (SbBool copyconnections)β fix things up post-copyvirtual SbBool referencesCopy (void) constβ does it reference the copy? answering thatvoid addNode (SoNode *node)β add a node, simple asvoid insertNode (SoNode *node, int idx)β insert a node at positionidxSoNode * getNode (int idx) constβ get the node sitting atidxint findNode (const SoNode *node) constβ find that specific nodeint getNumNodes (void) constβ how many nodes are we even working withvoid removeNode (int index)β remove a node by indexvoid removeNode (SoNode *node)β remove a node by pointer (yes, same name, overloaded, iconic)void removeAllNodes (void)β remove ALL of them, clean slate π§Ήvoid replaceNode (int idx, SoNode *newnode)β swap a node out by indexvoid replaceNode (SoNode *oldnode, SoNode *newnode)β swap a node out by pointervirtual void deleteValues (int start, int num=-1)β delete values, andnumdefaults to-1virtual void insertSpace (int start, int num)β make room fornumvalues atstart
π Public Member Functions inherited from SoMField π
your inheritance, bestie, all of it:
virtual ~SoMField ()
int getNum (void) const
void setNum (const int num)
SbBool set1 (const int index, const char *const valuestring)
void get1 (const int index, SbString &valuestring)
virtual void enableDeleteValues (void)
virtual SbBool isDeleteValuesEnabled (void) const
π¦ Public Member Functions inherited from SoField π¦
okay this part is LONG but we don't skip, we never skip:
virtual ~SoField ()
void setIgnored (SbBool ignore)
SbBool isIgnored (void) const
void setDefault (SbBool defaultVal)
SbBool isDefault (void) const
SbBool isOfType (const SoType type) const
void enableConnection (SbBool flag)
SbBool isConnectionEnabled (void) const
SbBool connectFrom (SoEngineOutput *master, SbBool notnotify=FALSE,
SbBool append=FALSE)
SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=FALSE)
void disconnect (SoEngineOutput *engineoutput)
SbBool isConnectedFromEngine (void) const
SbBool getConnectedEngine (SoEngineOutput *&master) const
SbBool connectFrom (SoField *master, SbBool notnotify=FALSE, SbBool
append=FALSE)
SbBool appendConnection (SoField *master, SbBool notnotify=FALSE)
void disconnect (SoField *field)
SbBool isConnectedFromField (void) const
SbBool getConnectedField (SoField *&master) const
int getNumConnections (void) const
int getForwardConnections (SoFieldList &slavelist) const
int getConnections (SoFieldList &masterlist) const
void disconnect (void)
SbBool isConnected (void) const
void setContainer (SoFieldContainer *cont)
SoFieldContainer * getContainer (void) const
SbBool set (const char *valuestring)
void get (SbString &valuestring)
SbBool shouldWrite (void) const
virtual void touch (void)
virtual void startNotify (void)
virtual void notify (SoNotList *nlist)
SbBool enableNotify (SbBool on)
SbBool isNotifyEnabled (void) const
void addAuditor (void *f, SoNotRec::Type type)
void removeAuditor (void *f, SoNotRec::Type type)
int operator== (const SoField &f) const
int operator!= (const SoField &f) const
virtual void connectionStatusChanged (int numconnections)
SbBool isReadOnly (void) const
void copyConnection (const SoField *fromfield)
virtual SbBool read (SoInput *input, const SbName &name)
virtual void write (SoOutput *out, const SbName &name) const
void setFieldType (int type)
int getFieldType (void) const
SbBool getDirty (void) const
void setDirty (SbBool dirty)
void evaluate (void) const
β Static Public Member Functions β
the static girlies (no instance needed, they just exist):
static void * createInstance (void)β spin up an instancestatic SoType getClassTypeId (void)β the class type idstatic void initClass (void)β initialize the class
π Static Public Member Functions inherited from SoMField π
static SoType getClassTypeId (void)
static void atexit_cleanup (void)
static void initClass (void)
π Static Public Member Functions inherited from SoField π
static void initClass (void)
static void initClasses (void)
static void cleanupClass (void)
static SoType getClassTypeId (void)
π Protected Member Functions π
for the inner circle only π
virtual void deleteAllValues (void)β delete all the valuesvirtual void copyValue (int to, int from)β copy a value fromfromtotovirtual int fieldSizeof (void) constβ the size of the fieldvirtual void * valuesPtr (void)β pointer to the valuesvirtual void setValuesPtr (void *ptr)β set that values pointer toptrvirtual void allocValues (int num)β allocate space fornumvalues
π Protected Member Functions inherited from SoMField π
SoMField (void)
virtual void makeRoom (int newnum)
virtual SoNotRec createNotRec (SoBase *container)
void setChangedIndex (const int chgidx)
void setChangedIndices (const int chgidx=-1, const int numchgind=0)
π Protected Member Functions inherited from SoField π
SoField (void)
void valueChanged (SbBool resetdefault=TRUE)
virtual void evaluateConnection (void) const
virtual SbBool readConnection (SoInput *in)
virtual void writeConnection (SoOutput *out) const
SbBool isDestructing (void) const
π Protected Attributes π
SoNode ** valuesβ the values array itself, protected but present
π Protected Attributes inherited from SoMField π
int num
int maxNum
SbBool userDataIsUsed
π§ Additional Inherited Members π§
Public Types inherited from SoField
enum FieldType { NORMAL_FIELD = 0, EVENTIN_FIELD, EVENTOUT_FIELD,
EXPOSED_FIELD }
π Detailed Description π
okay so here's the tea: the SoMFNode class is a container for nodes. That's it, that's the vibe. π«Ά
This field container stores an array of pointers to nodes. It handles all the necessary functionality for dealing with copy, import and export operations. very "does it all so you don't have to" of it π
heads up bestie β node pointers stored in field instances of this type may be NULL pointers. so like, don't assume they're all filled in, okay? π
π See also π
SoNode,SoSFNode
and that's only the first half, so don't go anywhere β the rest is still coming πβ¨
β¨ MEMBER FUNCTION DOCUMENTATION β¨
okay bestie, this is the part where we go function by function π β grab a snack, there's a whole lot of them, but they're all little guys, promise.
void * SoMFNode::createInstance(void)[static]β okay so this one is internal to the library, and the docs are like, bestie, this is not likely to be of interest to the application programmer π. What it actually does: creates a new instance of the class type that corresponds to theSoTypeobject. That's it, that's the whole gig.SoType SoMFNode::getClassTypeId(void)[static]β a static method that hands you back theSoTypeobject associated with objects of this class. type-system core, yk? π«ΆSoType SoMFNode::getTypeId(void) const[virtual]β returns the type identification of an object derived from a class inheritingSoField. this is what makes runtime type checking and "downward" casting happen β¨.
Implements SoField.
void SoMFNode::copyFrom(const SoField & f)[virtual]β copies value(s) fromfinto this field. β οΈ important:fmust be of the same type as this field, no mixing, no swapping, no shortcuts.
Implements SoField.
SbBool SoMFNode::isSame(const SoField & f) const[virtual]β checks for equal type and value(s). both. the whole package π.
Implements SoField.
virtual void SoMFNode::deleteAllValues(void)[protected],[virtual]β yeah, it's aSoMFieldthing.
Implements SoMField.
virtual void SoMFNode::copyValue(int to, int from)[protected],[virtual]β also aSoMFieldthing, copy from one slot to another, internal business π§.
Implements SoMField.
const SoNode ** SoMFNode::getValues(const int start) const[inline]β returns a pointer to the values array. raw access, handle with care bestie π .void SoMFNode::initClass(void)[static]β internal method that gets called when the library initializes (fromSoDB::init()) so the type system can get set up π±.void SoMFNode::fixCopy(SbBool copyconnections)[virtual]β so this one gets called internally, right afterSoField::copyFrom()during scene graph copies, and it's supposed to do whatever operations are necessary to fix up the field instance after it's gotten a new value.
The default method in the SoField superclass does nothing. literally nothing. a whole vibe of emptiness π.
The application programmer should normally not need to consider this method β unless you're constructing a complex field type that contains new references to container instances (i.e. nodes or engines). In that case, overriding this method becomes necessary, because you have to update those reference pointers: they could have been duplicated during the copy operation π.
Reimplemented from SoField.
SbBool SoMFNode::referencesCopy(void) const[virtual]β returnsTRUEif this field has references to any containers in the scene graph which are also duplicated during the copy operation.
heads up: this method is only valid to call during copy operations. no copy, no call π«.
Also go read the note about the relevance of the fixCopy() method for application programmers, because that note applies to this method too π«Ά.
Reimplemented from SoField.
π¦ The Coin-Extension Squad π¦
okay so this whole lil crew is Coin-only β these functions are extensions for Coin, and they are not available in the original SGI Open Inventor v2.1 API. every single one of them landed in Coin 2.0. iconic behavior honestly π
void SoMFNode::addNode(SoNode * node)β adds a node at the end of the array. π₯
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
void SoMFNode::insertNode(SoNode * node, int idx)β inserts a node at indexidx. right there, exactly where you point π
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
SoNode * SoMFNode::getNode(int idx) constβ returns the node at indexidx. hand it over π«΄
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
int SoMFNode::findNode(const SoNode * node) constβ returns the index for the first instance ofnodein the field, or-1if it's not found π.
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
int SoMFNode::getNumNodes(void) constβ returns the number of nodes in this field. count 'em π’
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
void SoMFNode::removeNode(int idx)β removes the node at indexidx. bye bestie π
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
void SoMFNode::removeNode(SoNode * node)β removes the first instance ofnodein the field. only the first one, don't get greedy π
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
void SoMFNode::removeAllNodes(void)β removes all nodes from the field. full reset, clean slate, main character energy β¨
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
void SoMFNode::replaceNode(int idx, SoNode * newnode)β replaces the node at indexidxwithnewnode. glow-up moment πΈ
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
void SoMFNode::replaceNode(SoNode * oldnode, SoNode * newnode)β replaces the first instance ofoldnodewithnewnode. the first one only π
Coin extension, not in the original SGI Open Inventor v2.1 API. Since Coin 2.0.
π The Array-Shuffling Duo π
virtual void SoMFNode::deleteValues(int start, int numarg = -1)[virtual]β removes value elements from indexstartup to and including indexstart + num - 1. note that elements with indices larger than the last deleted element get moved downwards in the value array, so everything slides into place π«Ά.
And if num equals -1? it deletes from index start all the way to the end of the array. yeet π.
Reimplemented from SoMField.
virtual void SoMFNode::insertSpace(int start, int numarg)[virtual]β insertsnum"slots" for new value elements fromstart. the elements already present fromstartget moved "upward" in the extended array. making room, respectfully π
Reimplemented from SoMField.
π AUTHOR π
Generated automatically by Doxygen for Coin from the source code. no human wrote this, it's a robot's finest work π€π
aaaaand that's the whole page bestie!! this one's from Coin version 4.0.10, stamped Thu Jun 25 2026, and yeah β it's SoMFNode(3), you found it, you read it, you ate πβ¨ periodt.
π¦ 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