SoMFNode(3)

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

okay bestie sit DOWN because we're doing SoMFNode(3) from the Library Functions Manual today and she is genuinely so important. this is part one of two so hydrate, grab a snack, and let's get into it πŸ’–


πŸŽ€ NAME πŸŽ€

SoMFNode β€” the class that is literally a container for nodes. that's her whole job description and she does it flawlessly. no notes. πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/fields/SoMFNode.h>

Inherits SoMField β€” yes she's part of the multi-field family, the nepo baby of field containers (affectionate) 🫢

πŸ’… Public Member Functions πŸ’…

the whole squad, right here:

  • virtual SoType getTypeId (void) const
  • virtual void copyFrom (const SoField &field)
  • const SoMFNode & operator= (const SoMFNode &field)
  • virtual SbBool isSame (const SoField &field) const
  • SoNode * operator[] (const int idx) const
  • const SoNode ** getValues (const int start) const
  • int find (SoNode *value, SbBool addifnotfound=0)
  • void setValues (const int start, const int num, const SoNode **newvals)
  • void set1Value (const int idx, SoNode *value)
  • void setValue (SoNode *value)
  • SoNode * operator= (SoNode *val)
  • SbBool operator== (const SoMFNode &field) const
  • SbBool operator!= (const SoMFNode &field) const
  • SoNode ** startEditing (void)
  • void finishEditing (void)
  • virtual void fixCopy (SbBool copyconnections)
  • virtual SbBool referencesCopy (void) const
  • void addNode (SoNode *node)
  • void insertNode (SoNode *node, int idx)
  • SoNode * getNode (int idx) const
  • int findNode (const SoNode *node) const
  • int getNumNodes (void) const
  • void removeNode (int index)
  • void removeNode (SoNode *node)
  • void removeAllNodes (void)
  • void replaceNode (int idx, SoNode *newnode)
  • void replaceNode (SoNode *oldnode, SoNode *newnode)
  • virtual void deleteValues (int start, int num=-1)
  • virtual void insertSpace (int start, int num)

🌸 Public Member Functions inherited from SoMField 🌸

she didn't come alone, she brought the family:

  • 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)

🌈 Public Member Functions inherited from SoField 🌈

the extended universe, honestly:

  • virtual ~SoField ()
  • void setIgnored (SbBool ignore)
  • SbBool isIgnored (void) const
  • void setDefault (SbBool def)
  • SbBool isDefault (void) const
  • SbBool isOfType (const SoType type) const
  • void enableConnection (SbBool flag)
  • SbBool isConnectionEnabled (void) const
  • SbBool connectFrom (SoEngineOutput *master, SbBool notnotify=0, SbBool append=0)
  • SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=0)
  • void disconnect (SoEngineOutput *engineoutput)
  • SbBool isConnectedFromEngine (void) const
  • SbBool getConnectedEngine (SoEngineOutput *&master) const
  • SbBool connectFrom (SoField *master, SbBool notnotify=0, SbBool append=0)
  • SbBool appendConnection (SoField *master, SbBool notnotify=0)
  • 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 *in, 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 ⭐

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

⭐ Static Public Member Functions inherited from SoMField ⭐

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

⭐ Static Public Member Functions inherited from SoField ⭐

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

πŸ¦‹ Protected Member Functions πŸ¦‹

for the ones who live behind the curtain:

  • virtual void deleteAllValues (void)
  • virtual void copyValue (int to, int from)
  • virtual int fieldSizeof (void) const
  • virtual void * valuesPtr (void)
  • virtual void setValuesPtr (void *ptr)
  • virtual void allocValues (int num)

πŸ¦‹ Protected Member Functions inherited from SoMField πŸ¦‹

  • SoMField (void)
  • virtual void makeRoom (int newnum)

πŸ¦‹ Protected Member Functions inherited from SoField πŸ¦‹

  • SoField (void)
  • void valueChanged (SbBool resetdefault=1)
  • virtual void evaluateConnection (void) const
  • virtual SbBool readConnection (SoInput *in)
  • virtual void writeConnection (SoOutput *out) const
  • SbBool isDestructing (void) const

πŸ“ Protected Attributes πŸ“

  • SoNode ** values

πŸ“ 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 πŸ‘‘

The SoMFNode class is a container for nodes. that's the headline, bestie, and she delivers.

This field container stores an array of pointers to nodes. It takes care of all the necessary functionality for handling copy, import and export operations β€” the whole backstage crew situation so you don't have to think about it. ✨

🚨 lowkey important heads up: node pointers stored in field instances of this type may be NULL pointers. not a bug, just how she is. be aware. πŸ’€

πŸ‘€ See also

  • SoNode
  • SoSFNode

and bestie, that's just the top half of the whole story β€” there is so much more where this came from πŸ’–

πŸ’– Member Function Documentation πŸ’–

okay bestie, deep breath, because this is the part where we go function by function, one at a time, and I am not skipping a single one ✨ every signature, every "References", every "Referenced by" β€” all of it, no cap.


SoType SoMFNode::getTypeId (void) const [virtual]

Hands you back the type identification instance that uniquely identifies the Coin field class this object belongs to. it's the "who even am I" of field classes πŸ’…

See also: getClassTypeId(), SoType

Implements: SoField


void SoMFNode::copyFrom (const SoField & f) [virtual]

Copies the value(s) out of f and into this field. heads up bestie: f must be the same type as this field, or it's giving chaos 🫠

Implements: SoField


SbBool SoMFNode::isSame (const SoField & f) const [virtual]

Checks whether the type and the value(s) match. equality vibe check, basically 🌸

Implements: SoField


virtual void SoMFNode::deleteAllValues (void) [protected], [virtual]

Implements: SoMField


virtual void SoMFNode::copyValue (int to, int from) [protected], [virtual]

Implements: SoMField


const SoNode ** SoMFNode::getValues (const int start) const [inline]

Returns a pointer to the values array πŸŽ€

References: addNode(), findNode(), getNode(), getNumNodes(), insertNode(), removeAllNodes(), removeNode(), and replaceNode().

Referenced by: findNode(), and getNode().


void SoMFNode::fixCopy (SbBool copyconnections) [virtual]

okay so this one gets called internally after SoField::copyFrom() during scene graph copies, and it's supposed to do whatever's necessary to fix up the field instance after it just got a brand new value. the default method in the SoField superclass literally does nothing, so it's a whole "you're on your own" situation πŸ™ˆ

Here's the tea: the application programmer should normally not need to consider this method β€” unless he constructs a complex field type that contains new references to container instances (i.e. nodes or engines). In that case, overriding this method becomes necessary to update the reference pointers, since they could have been duplicated during the copy operation. so it's niche, but it's important when it's your problem πŸ’€

Reimplemented from: SoField.

References: SoBase::assertAlive(), SoNode::copy(), SoField::enableNotify(), SoFieldContainer::findCopy(), SoMField::getNum(), and SoField::valueChanged().


SbBool SoMFNode::referencesCopy (void) const [virtual]

Returns TRUE if this field has references to any containers in the scene graph which are also duplicated during the copy operation πŸ‘‘

Note that this method only is valid to call during copy operations. that's a hard requirement, bestie, do not freestyle this one 😭

See also: the note about the relevance of the fixCopy() method for application programmers, as it is applicable on this method aswell.

Reimplemented from: SoField.

References: SoFieldContainer::checkCopy(), SoMField::getNum(), and SoField::referencesCopy().


void SoMFNode::addNode (SoNode * node)

Adds a node at the end of the array πŸ¦‹

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

References: SoMField::getNum().

Referenced by: getValues().


void SoMFNode::insertNode (SoNode * node, int idx)

Inserts a node at index idx ✨

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

References: SoMField::getNum(), and insertSpace().

Referenced by: getValues().


SoNode * SoMFNode::getNode (int idx) const

Returns the node at index idx πŸ’–

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

References: SoMField::getNum(), and getValues().

Referenced by: getValues().


int SoMFNode::findNode (const SoNode * node) const

Returns the index for the first instance of node in the field, or -1 if it's not found anywhere πŸ”

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

References: SoMField::getNum(), and getValues().

Referenced by: getValues(), removeNode(), and replaceNode().


int SoMFNode::getNumNodes (void) const

Returns the number of nodes in this field πŸ”’

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

References: SoMField::getNum().

Referenced by: getValues().


void SoMFNode::removeNode (int idx)

Removes the node at index idx 🧚

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

References: deleteValues(), and SoMField::getNum().

Referenced by: getValues(), and removeNode().


void SoMFNode::removeNode (SoNode * node)

Removes the first instance of node in the field πŸ‘‘

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

References: findNode(), and removeNode().


void SoMFNode::removeAllNodes (void)

Removes all nodes from the field. clean slate energy 🌈

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

References: SoMField::setNum().

Referenced by: getValues().


void SoMFNode::replaceNode (int idx, SoNode * newnode)

Replaces the node at index idx with newnode πŸ’…

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

References: SoMField::getNum().

Referenced by: getValues(), and replaceNode().


void SoMFNode::replaceNode (SoNode * oldnode, SoNode * newnode)

Replaces the first instance of oldnode with newnode πŸŽ€

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

References: findNode(), and replaceNode().


virtual void SoMFNode::deleteValues (int start, int numarg = -1) [virtual]

Remove value elements from index start up to and including index start + num - 1 βœ‚οΈ

Elements with indices larger than the last deleted element will be moved downwards in the value array.

If num equals -1, delete from index start and to the end of the array. so yeah, -1 is the "yeet everything from here on" option πŸ’€

Reimplemented from: SoMField.

References: SoMField::num.

Referenced by: removeNode().


virtual void SoMFNode::insertSpace (int start, int numarg) [virtual]

Insert num "slots" for new value elements from start. The elements already present from start will be moved "upward" in the extended array πŸ¦‹

Reimplemented from: SoMField.

References: SoMField::num.

Referenced by: insertNode().


πŸ“ Author πŸ“

Generated automatically by Doxygen for Coin from the source code. (yeah bestie, nobody hand-wrote this one, the robot did it πŸ€–βœ¨)


and that's a wrap on SoMFNode(3) 🫢 this page came from Coin, Version 2.5.0 β€” go forth, index your nodes, and slay πŸ’œ

πŸ“¦ where this page comes from