SOMFPATH(3iv)
π SoMFPath β the manual page, but make it cute π
okay bestie, so this is SoMFPath(3IV) β yes the manual name is literally that, it's giving very "my full legal name is on the group chat" energy. sit down, grab a strawberry, we're learning about fields. π
π NAME π
SoMFPath β a multiple-value field that holds literally any number of pointers to paths. multiple values. any number. pointers to paths. we contain multitudes, periodt. π
𧬠INHERITS FROM π§¬
SoField > SoMField > SoMFPath
it's a whole family tree, iykyk. π
β¨ SYNOPSIS β¨
#include <Inventor/fields/SoMFPath.h>
Methods from class SoMFPath:
static SoType getClassTypeId()
virtual void getTypeId() const
SoPath * operator [](int i) const
const SoPath * * getValues(int start) const
int find(SoPath * targetValue, SbBool addIfNotFound =
FALSE)
void setValues(int start, int num, const SoPath *
*newValues)
void set1Value(int index, SoPath * newValue)
SoPath * operator =(SoPath * newValue)
void setValue(SoPath * newValue)
int operator ==(const SoMFPath &f) const
int operator !=(const SoMFPath &f) const
SoPath * * startEditing()
void finishEditing()
Methods from class SoMField:
int getNum() const
void setNum(int num)
virtual void deleteValues(int start, int num = -1)
virtual void insertSpace(int start, int num)
SbBool set1(int index, const char *valueString)
void get1(int index, SbString &valueString)
Methods from class SoField:
void setIgnored(SbBool ignore)
SbBool isIgnored() const
SbBool isDefault() const
virtual SbBool isOfType(SoType type) const
SbBool set(const char *valueString)
void get(SbString &valueString)
void touch()
SbBool connectFrom(SoField *fromField)
SbBool connectFrom(SoEngineOutput *fromEngine)
void disconnect()
SbBool isConnected() const
SbBool isConnectedFromField() const
SbBool getConnectedField(SoField *&writingField) const
SbBool isConnectedFromEngine() const
SbBool getConnectedEngine(SoEngineOutput *&engineOutput)
const
void enableConnection(SbBool flag)
SbBool isConnectionEnabled() const
int getForwardConnections(SoFieldList &list) const
SoFieldContainer * getContainer() const
π¦ DESCRIPTION π¦
so this field keeps a whole set of pointers to SoPath instances, and it's lowkey doing the most: it correctly maintains their reference counts the entire time. it's the friend who remembers everyone's birthdays. π«Ά
SoMFPaths get written to file as one or more paths (go read the SoPath manual page if you want the whole tea on the file format for a path). and the way that when more than one value is present, all of the values are wrapped in square brackets and separated by commas? iconic. no notes. π
π METHODS π
static SoType getClassTypeId()virtual void getTypeId() const
gives you back the type for this class, or for one specific object of this class. it's giving "who am I, really?" πΈ
SoPath * operator [](int i) const
hands you the i'th value of the field. β οΈ but bestie, listen: indexing past the end of the field (like, passing in an i greater than getNum()) will return garbage. not "undefined vibes", actual garbage. stay in your lane, stay in bounds. π
const SoPath * * getValues(int start) const
returns a pointer into the array of values in the field, starting at index start. these values are read-only β if you wanna modify values in place, go look at startEditing()/finishEditing(). they're the ones with the keys. π
int find(SoPath * targetValue, SbBool addIfNotFound = FALSE)
hunts down the given value in the array and returns the index where it lives. if it's not there? you get -1. and if addIfNotFound is set, then targetValue gets added to the end of the array β but plot twist, -1 is still returned. it was found and you still got -1. that's just the deal. π
void setValues(int start, int num, const SoPath * *newValues)
sets num values starting at index start to the values in newValues. the array will automatically be made bigger to accommodate the new values if it needs to. it expands. growth mindset fr fr. π±
void set1Value(int index, SoPath * newValue)
sets the index'th value in the array to newValue. array gets automatically expanded if necessary. same energy. β¨
SoPath * operator =(SoPath * newValue)void setValue(SoPath * newValue)
sets the first value in the array to newValue, and then deletes the second and every subsequent value. it's not sharing, it's not compromising β it's one value and one value only. main character energy, truly. π
int operator ==(const SoMFPath &f) constint operator !=(const SoMFPath &f) const
returns TRUE if all of the values of this field equal (or don't equal, for !=) those of the given field. β οΈ but if the fields are different types, FALSE is always returned β even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example. yes, literally that example. they are not the same and the code said so. π
SoPath * * startEditing()void finishEditing()
startEditing() returns a pointer to the internally-maintained array that you're allowed to modify. you may change the values in the array, but you cannot add or remove values. π«
and it is illegal to call any other editing methods betweenstartEditing()andfinishEditing()β likeset1Value(),setValue(), etc. do not. just don't. π
fields, engines or sensors connected to this field, and sensors, do not get notified that this field changed until finishEditing() is called. and calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed β even if none of the values actually changed. it said "something happened" and it stands by that. periodt. π
and that's the whole page, bestie!! every option, every signature, every -1, every FALSE, all present and accounted for β nothing skipped, nothing invented. π
okay so this gorgeous little manual was brought to you by SoMFPath(3IV)() β that's the source/version tag, and the date slot is just vibing there, empty, keeping its mystery. π¦πβ¨
slay, go edit some fields responsibly π π
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms