SOMFBOOL(3iv)
π SoMFBool β the manual page, bestie edition π
okay so welcome to SoMFBool(3IV), the manual page for SoMFBool, and honestly? it's giving "small but mighty" β¨ it's a multiple-value field that holds any number of boolean values. that's the whole vibe. let's get into it π«Ά
πΈ NAME πΈ
SoMFBool β a multiple-value field containing any number of boolean values π
𧬠INHERITS FROM π§¬
SoField > SoMField > SoMFBool
so yeah, it's down the family tree from SoField and SoMField, iykyk π
β¨ SYNOPSIS β¨
first things first, you gotta pull it in:
#include <Inventor/fields/SoMFBool.h>
π Methods from class SoMFBool
static SoType getClassTypeId()
virtual void getTypeId() const
SbBool operator [](int i) const
const SbBool * getValues(int start) const
int find(SbBool targetValue, SbBool addIfNotFound = FALSE)
void setValues(int start, int num, const SbBool *newValues)
void set1Value(int index, SbBool newValue)
SbBool operator =(SbBool newValue)
void setValue(SbBool newValue)
int operator ==(const SoMFBool &f) const
int operator !=(const SoMFBool &f) const
SbBool * 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 π
A multiple-value field that contains any number of boolean values. literally any number. go off π
SoMFBools get written to file as one or more boolean values, and those values get written as "0" (which is the stand-in for a false value), "1", "TRUE", or "FALSE". four whole looks, pick your fave π
When more than one value is present, all of the values are wrapped up in square brackets and separated by commas, like this:
[ 0, FALSE, 1, TRUE ]
iconic formatting behavior, no cap β¨
π οΈ METHODS π οΈ
static SoType getClassTypeId()virtual void getTypeId() constβ Returns the type for this class, or for a particular object of this class. it's giving "who am I, really" πͺSbBool operator [](int i) constβ Returns the i'th value of the field. okay so heads up bestie: indexing past the end of the field (aka passing in anigreater thangetNum()) will return garbage. not a vibe. don't do it πconst SbBool *getValues(int start) constβ Returns a pointer into the array of values in the field, starting at indexstart. These values are read-only, so hands off π β if you wanna modify values in place, go see thestartEditing()/finishEditing()methods instead.int find(SbBool targetValue, SbBool addIfNotFound = FALSE)β Finds the given value in the array and returns the index of that value in the array. If the value is not found,-1is returned. IfaddIfNotFoundis set, thentargetValuegets added to the end of the array β but-1is still returned. yes really. that's the deal πvoid setValues(int start, int num, const SbBool *newValues)β Setsnumvalues starting at indexstartto the values innewValues. The array will automatically be made larger to accomodate the new values, if necessary. it grows for you, queen π±void set1Value(int index, SbBool newValue)β Sets theindex'th value in the array tonewValue. The array will be automatically expanded, if necessary.SbBool operator =(SbBool newValue)void setValue(SbBool newValue)β Sets the first value in the array tonewValue, and deletes the second and subsequent values. brutal? yes. efficient? also yes πint operator ==(const SoMFBool &f) constint operator !=(const SoMFBool &f) constβ ReturnsTRUEif all of the values of this field equal (do not equal) those of the given field. If the fields are different types,FALSEwill always be returned β even if one field is anSoMFFloatwith one value of1.0and the other is anSoMFIntwith a value of1, for example. type match matters, bestie, no shortcuts π§SbBool *startEditing()void finishEditing()βstartEditing()returns a pointer to the internally-maintained array that can be modified. The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods betweenstartEditing()andfinishEditing()(e.g.set1Value(),setValue(), etc).
Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. 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. yeah, it announces the change anyway. main character energy π
β οΈ fr fr, remember: no other editing methods in betweenstartEditing()andfinishEditing(). and indexing pastgetNum()hands you garbage. these are the rules, bestie.
and that's the whole page π this was SoMFBool(3IV), and the footer down at the bottom just reads SoMFBool(3IV)() β same name, and the version/date slot is sitting there empty, no cap. love that for it πβ¨
π¦ 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