SoMFNode(3)

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

πŸ’– SoMFNode β€” from the Library Functions Manual ✨

okay so bestie, we're doing the SoMFNode(3) page today and honestly? it's giving "list of nodes but make it a whole class". let's get into it 🫢


🌸 NAME

SoMFNode β€” it's a container for nodes. that's the whole personality. one job, does it well πŸ’…


🌈 SYNOPSIS

first thing you do, always, no exceptions:

#include <Inventor/fields/SoMFNode.h>

and it Inherits SoMField. so it's got a whole family tree behind it, iykyk 🌳

πŸ‘‘ Public Member Functions

here's everything SoMFNode brings to the table itself:

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=FALSE)
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

these are the ones it got from its parent, still slaying:

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

the whole extended family, no cap:

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

static girlies, they don't need an instance to exist πŸ’«

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 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 internal-use-only besties (respect the privacy pls):

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=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

🧚 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.

This field container stores an array of pointers to nodes. It takes care of the necessary functionality for handling copy, import and export operations. so like, it's not just holding the pointers, it's doing the admin work too β€” copy, import, export, all of it. multitasking icon ✨

⚠️ heads up bestie: note that node pointers stored in field instances of this type may be NULL pointers. so vibe check your pointers before you use them, fr fr 😭

See also: SoNode, SoSFNode


πŸ’… Member Function Documentation

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

Returns the type identification instance which uniquely identifies the Coin field class the object belongs to. it's basically the class's government name πŸͺͺ

See also: getClassTypeId(), SoType

Implements SoField.

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

Copy value(s) from f into this field. f must be of the same type as this field. no cross-type situationships allowed πŸ™…β€β™€οΈ

Implements SoField.

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

Check for equal type and value(s). a full vibe check on both type and values πŸ”

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. just hand me the array, periodt πŸ’β€β™€οΈ

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

This method is internally called after SoField::copyFrom() during scene graph copies, and should do the operations necessary for fixing up the field instance after it has gotten a new value.

The default method in the SoField superclass does nothing.

The application programmer should normally not need to consider this method, unless he constructs a complex field type which contains new references to container instances (i.e. nodes or engines). Overriding this method is then necessary to update the reference pointers, as they could have been duplicated during the copy operation.

so tl;dr: if you're just vibing with normal fields, ignore this. if you're building a fancy custom field with references to containers, you have to override it or your pointers will be messy 😭

Reimplemented from SoField.

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.

See also the note about the relevance of the fixCopy() method for application programmers, as it is applicable on this method aswell. (yes, "aswell" β€” we keep the original spelling, we don't fix what isn't ours πŸ’…)

Reimplemented from SoField.

void SoMFNode::addNode (SoNode * node)

Adds a node at the end of the array. push it to the back, bestie 🫢

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 SoMFNode::insertNode (SoNode * node, int idx)

Inserts a node at index idx. sliding it in at exactly the right spot 😌

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

SoNode * SoMFNode::getNode (int idx) const

Returns the node at index idx. gimme the one at that position pls πŸŽ€

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

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

Returns the index for the first instance of node in the field, or -1 if not found. first match only, we're not doing duplicates πŸ”Ž

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

int SoMFNode::getNumNodes (void ) const

Returns the number of nodes in this field. how many besties are in the group chat πŸ“±

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 SoMFNode::removeNode (int idx)

Removes the node at index idx. bye girl πŸ‘‹

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 SoMFNode::removeNode (SoNode * node)

Removes the first instance of node in the field. only the first one, the rest stay 🫢

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 SoMFNode::removeAllNodes (void )

Removes all nodes from the field. total clear-out, no survivors πŸ’€

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 SoMFNode::replaceNode (int idx, SoNode * newnode)

Replaces the node at index idx with newnode. glow-up at that exact position ✨

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 SoMFNode::replaceNode (SoNode * oldnode, SoNode * newnode)

Replaces the first instance of oldnode with newnode. first one only, again 🌸

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

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. so everything after just scooches down to fill the gap 🧚

If num equals -1, delete from index start and to the end of the array. (-1 = "just take everything from here on out")

Reimplemented from SoMField.

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. making room for the new girls, everyone shuffle up πŸ’…

Reimplemented from SoMField.


✨ Author ✨

okay so nobody wrote this page with their own two hands πŸ’€ it was generated automatically by Doxygen for Coin from the source code. so basically the docs wrote themselves, which is lowkey iconic of them, no cap πŸŽ€ the source code is the main character and Doxygen is just the ✨stenographer✨

ngl it's giving "the code is the vibe, the docs are the mirror" πŸͺžβœ¨ anyway bestie that's the whole page 🫢


and that's a wrap on SoMFNode(3), bestie!! πŸ’– this one came from Coin, Version 3.1.3 🌸 go forth and slay, and remember: the source code said it first, Doxygen just told you about it πŸ‘‘ βœ¨πŸ’…

πŸ“¦ where this page comes from