SOMFBITMASK(3iv)
π NAME
okay so, bestie, meet SoMFBitMask β a multiple-value field containing any number of masks of bit flags. yes, masks of bit flags. plural. any number. she's flexible like that β¨
𧬠INHERITS FROM
SoField > SoMField > SoMFEnum > SoMFBitMask
so like, she comes from a whole lineage of field girlies. generational wealth, honestly π
β¨ SYNOPSIS β¨
first things first, you gotta pull her in:
#include <Inventor/fields/SoMFBitMask.h>
π Methods from class SoMFBitMask
static SoType getClassTypeId()
virtual void getTypeId() const
int operator [](int i) const
const int * getValues(int start) const
int find(int targetValue, SbBool addIfNotFound = FALSE)
void setValues(int start, int num, const int *newValues)
void set1Value(int index, int newValue)
int operator =(int newValue)
void setValue(int newValue)
int operator ==(const SoMFBitMask &f) const
int operator !=(const SoMFBitMask &f) const
int * 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. SoMFBitMask is a multiple-value field that holds any number of masks of bit flags, and it stores them as ints. Nodes and engines that use this field class get to define mnemonic names for the bit flags β cute little nicknames for each flag, basically. and here's the thing: you should use those names when you're setting or testing the values of the field, even though underneath, the methods treat everything as integers. iykyk π«Ά
when you're testing and setting flags inside a mask, you use the bit-wise "&" and "|" operators. those two. no others. slay.
SoMFBitMasks are written to file as one or more mnemonic enumerated type names, in this format:
( flag1 | flag2 | ... )
if only one flag is used in a mask, the parentheses are optional β she's chill like that π
β οΈ these names differ among uses of this field in various node or engine classes. so you gotta go check the reference pages for the specific nodes or engines to find the names. don't guess, bestie.
the field values may also be represented as integers, but this is not guaranteed to be portable. so like, technically allowed, spiritually risky π
when more than one value is present, all of the values get enclosed in square brackets and separated by commas. periodt.
π METHODS π
π The SoMFBitMask girlies
static SoType getClassTypeId()virtual void getTypeId() const
β these two return the type for this class, or for a particular object of this class. type check, passed β
int operator [](int i) const
β returns the i'th value of the field. but fair warning: 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. you've been warned π«
const int * getValues(int start) const
β returns a pointer into the array of values in the field, starting at index start. these values are read-only, so don't get any ideas β if you wanna modify values in place, go look at the startEditing() / finishEditing() methods instead π
int find(int targetValue, SbBool addIfNotFound = FALSE)
β hunts down the given value in the array and returns the index of that value. if the value is not found, -1 is returned. and if addIfNotFound is set, then targetValue gets added to the end of the array β but heads up, -1 is still returned. yes, she adds it and still tells you no. iconic behavior honestly π
void setValues(int start, int num, const int *newValues)
β sets num values starting at index start to the values in newValues. the array will automatically be made larger to accomodate the new values, if necessary. she grows π±
void set1Value(int index, int newValue)
β sets the index'th value in the array to newValue. the array will automatically be expanded, if necessary. again: she grows.
int operator =(int newValue)void setValue(int newValue)
β sets the first value in the array to newValue, and then deletes the second and subsequent values. ruthless. one and done. βοΈ
int operator ==(const SoMFBitMask &f) constint operator !=(const SoMFBitMask &f) const
β returns TRUE if all of the values of this field equal (or do not equal, for !=) those of the given field. and here's the catch, bestie: 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. like, same vibe, different type, still FALSE. no cap π«
int * startEditing()void finishEditing()
β startEditing() returns a pointer to the internally-maintained array that can be modified. 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 between startEditing() and finishEditing() β that means set1Value(), setValue(), etc. do not do it. i'm serious π
fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. so the whole time you're editing, everyone else is just... unaware. living their lives. π
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. she announces it regardless. main character energy, truly π
π a lil sign-off
that's the whole page, bestie. and just so we're official about it: this is the SoMFBitMask(3IV)() manual page β that's the manual name, version and date all wrapped up together, and yeah, the version/date slots are sitting there empty like an unread group chat. go forth and mask those bits responsibly. mwah πβ¨π¦
π¦ 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