SoMFNode(3)
π 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
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms