SoMFNode(3)
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) constvirtual void copyFrom (const SoField &field)const SoMFNode & operator= (const SoMFNode &field)virtual SbBool isSame (const SoField &field) constSoNode * operator[] (const int idx) constconst SoNode ** getValues (const int start) constint 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) constSbBool operator!= (const SoMFNode &field) constSoNode ** startEditing (void)void finishEditing (void)virtual void fixCopy (SbBool copyconnections)virtual SbBool referencesCopy (void) constvoid addNode (SoNode *node)void insertNode (SoNode *node, int idx)SoNode * getNode (int idx) constint findNode (const SoNode *node) constint getNumNodes (void) constvoid 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) constvoid 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) constvoid setDefault (SbBool def)SbBool isDefault (void) constSbBool isOfType (const SoType type) constvoid enableConnection (SbBool flag)SbBool isConnectionEnabled (void) constSbBool connectFrom (SoEngineOutput *master, SbBool notnotify=0, SbBool append=0)SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=0)void disconnect (SoEngineOutput *engineoutput)SbBool isConnectedFromEngine (void) constSbBool getConnectedEngine (SoEngineOutput *&master) constSbBool connectFrom (SoField *master, SbBool notnotify=0, SbBool append=0)SbBool appendConnection (SoField *master, SbBool notnotify=0)void disconnect (SoField *field)SbBool isConnectedFromField (void) constSbBool getConnectedField (SoField *&master) constint getNumConnections (void) constint getForwardConnections (SoFieldList &slavelist) constint getConnections (SoFieldList &masterlist) constvoid disconnect (void)SbBool isConnected (void) constvoid setContainer (SoFieldContainer *cont)SoFieldContainer * getContainer (void) constSbBool set (const char *valuestring)void get (SbString &valuestring)SbBool shouldWrite (void) constvirtual void touch (void)virtual void startNotify (void)virtual void notify (SoNotList *nlist)SbBool enableNotify (SbBool on)SbBool isNotifyEnabled (void) constvoid addAuditor (void *f, SoNotRec::Type type)void removeAuditor (void *f, SoNotRec::Type type)int operator== (const SoField &f) constint operator!= (const SoField &f) constvirtual void connectionStatusChanged (int numconnections)SbBool isReadOnly (void) constvoid copyConnection (const SoField *fromfield)virtual SbBool read (SoInput *in, const SbName &name)virtual void write (SoOutput *out, const SbName &name) constvoid setFieldType (int type)int getFieldType (void) constSbBool getDirty (void) constvoid 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) constvirtual 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) constvirtual SbBool readConnection (SoInput *in)virtual void writeConnection (SoOutput *out) constSbBool isDestructing (void) const
π Protected Attributes π
SoNode ** values
π Protected Attributes inherited from SoMField π
int numint maxNumSbBool 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
SoNodeSoSFNode
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
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.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