SOMFENGINE(3iv)
π SoMFEngine π
okay bestie, welcome to the SoMFEngine(3IV) glow-up β¨ this is a 3IV man page and we are going to understand it, not just survive it. no cap.
πΈ NAME πΈ
SoMFEngine β a multiple-value field that holds any number of pointers to engines π§
like. any number. go feral, queen.
π¦ INHERITS FROM π¦
SoField > SoMField > SoMFEngine
it's giving three generations of field royalty and this one is the main character π
β¨ SYNOPSIS β¨
#include <Inventor/fields/SoMFEngine.h>
π Methods from class SoMFEngine
static SoType getClassTypeId()
virtual void getTypeId() const
SoEngine * operator [](int i) const
const SoEngine * * getValues(int start) const
int find(SoEngine * targetValue, SbBool addIfNotFound =
FALSE)
void setValues(int start, int num, const SoEngine *
*newValues)
void set1Value(int index, SoEngine * newValue)
SoEngine * operator =(SoEngine * newValue)
void setValue(SoEngine * newValue)
int operator ==(const SoMFEngine &f) const
int operator !=(const SoMFEngine &f) const
SoEngine * * 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 lil squad of pointers to SoEngine instances, and β this is the important part β it maintains their reference counts correctly. no leaking, no premature death, it's very responsible of her fr fr π«Ά
SoMFEngines get written to file as one or more engines. when there's more than one value, all the values get wrapped in square brackets and separated by commas, like this:
[ ElapsedTime { }, OneShot { duration 2.0 }, USE myCalculator ]
see? brackets, commas, iconic. that's the vibe check. β
π₯ METHODS π₯
π the basics
static SoType getClassTypeId()virtual void getTypeId() const
hands you the type for this class, or for one specific object of this class. iykyk.
π getting at your values
SoEngine * operator [](int i) const
returns the i'th value of the field. β οΈ heads up bestie: indexing past the end of the field (like, passing in an i greater than getNum()) will return garbage. not "an error", not "a nice message", garbage. π don't do it.
const SoEngine * * 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 want to modify values in place, go look at the startEditing()/finishEditing() methods. π
int find(SoEngine * targetValue, SbBool addIfNotFound = FALSE)
hunts for the given value in the array and returns the index of that value. if it's not found, you get -1 back. if addIfNotFound is set, then targetValue gets added to the end of the array β but (and this is the lil plot twist) -1 is still returned. π
void setValues(int start, int num, const SoEngine * *newValues)
sets num values starting at index start to the values in newValues. the array will automatically be made bigger to fit the new values, if that's what's needed. β¨
void set1Value(int index, SoEngine * newValue)
sets the index'th value in the array to newValue. the array gets automatically expanded, if necessary. one value, one job. π
SoEngine * operator =(SoEngine * newValue)void setValue(SoEngine * newValue)
sets the first value in the array to newValue, and then β sorry to the other values β deletes the second and subsequent values. brutal. slay. πβ¨
π¦ comparing
int operator ==(const SoMFEngine &f) constint operator !=(const SoMFEngine &f) const
returns TRUE if all of the values of this field equal (or do not equal) those of the given field. if the fields are different types, FALSE will always be 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. like, they look the same but they're not the same, and the code knows it. π
π editing in place
SoEngine * * startEditing()void finishEditing()
startEditing() returns a pointer to the internally-maintained array that you can modify. the values in the array may be changed, but values cannot be added or removed. and here's the rule, no exceptions: it is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc). don't test her. π«
fields, engines or sensors connected to this field and sensors are not notified that this field has 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 were changed. yes, even then. it's giving dramatic entrance for no reason but honestly? respect. π«Ά
that's the whole page, bestie. every option, every signature, every warning β nothing skipped, nothing invented. go forth and manage your engine pointers responsibly. π
πΈ mwah. this was SoMFEngine(3IV)(), straight from the source with love, no date on the tin because the original footer just says SoMFEngine(3IV)(). periodt. πΈ
π¦ 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