SOMFUINT32(3iv)

πŸ’– SoMFUInt32 β€” the multiple-value field that holds any number of uint32_t integers (3IV manual, bestie edition)

okay so, welcome to the SoMFUInt32 page, from the 3IV manual section. She's a multiple-value field containing any number of uint32_t integers β€” any number, she does not do limits. πŸ¦‹


🫢 INHERITS FROM

SoField > SoMField > SoMFUInt32

so she's a field, then she's a multi-field, then she's specifically the uint32_t girlie. the lineage is giving royal family, ngl. πŸ‘‘


✨ SYNOPSIS

pull her in like this:

#include <Inventor/fields/SoMFUInt32.h>

Methods from class SoMFUInt32:

static SoType       getClassTypeId()
virtual void        getTypeId() const
uint32_t            operator[](int i) const
const uint32_t *    getValues(int start) const
int                 find(uint32_t targetValue, SbBool addIfNotFound =
                         FALSE)
void                setValues(int start, int num, const uint32_t
                         *newValues)
void                set1Value(int index, uint32_t newValue)
uint32_t            operator =(uint32_t newValue)
void                setValue(uint32_t newValue)
int                 operator ==(const SoMFUInt32 &f) const
int                 operator !=(const SoMFUInt32 &f) const
uint32_t *          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 uint32_t (32-bit) integers. that's the whole personality and honestly? iconic. πŸ”₯

SoMFUInt32s get written out to file as one or more uint32_t integers, in decimal, hexadecimal or octal format. so she speaks all three dialects, no cap.

when there's more than one value hanging out, all of the values are wrapped in square brackets and separated by commas β€” like this:

[ 17, 0xFFFFE0, 0755 ]

πŸ’… METHODS

  • static SoType getClassTypeId()
  • virtual void getTypeId() const β€” hands you the type for this class, or for a particular object of this class.
  • uint32_t operator[](int i) const β€” gives you the i'th value of the field. ⚠️ but listen: indexing past the end of the field (passing in an i greater than getNum()) will return garbage. not an error, not a crash β€” just garbage. so don't. πŸ’€
  • const uint32_t *getValues(int start) const β€” returns a pointer into the array of values in the field, starting at index start. heads up: those values are read-only. if you wanna modify values in place, go look at the startEditing() / finishEditing() methods instead. πŸ”’
  • int find(uint32_t targetValue, SbBool addIfNotFound = FALSE) β€” hunts down the given value in the array and returns the index of that value in the array. if she can't find it, -1 comes back. and if addIfNotFound is set, then targetValue gets added to the end of the array β€” but -1 is still what gets returned. yes, still -1. that's not a typo, that's just the deal. 🫠
  • void setValues(int start, int num, const uint32_t *newValues) β€” sets num values starting at index start to the values sitting in newValues. the array will automatically be made larger to accommodate the new values, if necessary. she grows for you. πŸ’–
  • void set1Value(int index, uint32_t newValue) β€” sets the index'th value in the array to newValue. the array gets automatically expanded, if necessary.
  • uint32_t operator =(uint32_t newValue)
  • void setValue(uint32_t newValue) β€” sets the first value in the array to newValue, and then deletes the second and every subsequent value. she said one value only, everyone else pack it up. βœ‚οΈ
  • int operator ==(const SoMFUInt32 &f) const
  • int operator !=(const SoMFUInt32 &f) const β€” returns TRUE if all of the values of this field equal (or do not equal, for !=) those of the given field. but 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. nope, still FALSE. types have to actually match, no faking it. πŸ’…
  • uint32_t *startEditing()
  • void finishEditing() β€” startEditing() returns a pointer to the internally-maintained array, and that one 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() (think set1Value(), setValue(), etc). 🚫 don't do it, fr fr.

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 were changed. so she's dramatic, she announces it regardless. 😭


okay bestie that's the whole page!! πŸŽ€ and for the lil sign-off: the footer on this one is literally just

SoMFUInt32(3IV)()

β€” that's the source line, no version, no date, just the page name and the 3IV manual section, standing there looking cute. that's a wrap, go forth and hold your uint32_t integers. πŸ’œ