SOMFINT32(3iv)
π NAME π
SoMFInt32 β the multiple-value field that holds literally any number of int32_t integers π«Ά
πΈ INHERITS FROM πΈ
SoField > SoMField > SoMFInt32
Like, it's deep in the family tree bestie, it got the whole lineage π
β¨ SYNOPSIS β¨
#include <Inventor/fields/SoMFInt32.h>
π Methods from class SoMFInt32 π
static SoType getClassTypeId()
virtual void getTypeId() const
int32_t operator [](int i) const
const int32_t * getValues(int start) const
int find(int32_t targetValue, SbBool addIfNotFound =
FALSE)
void setValues(int start, int num, const int32_t
*newValues)
void set1Value(int index, int32_t newValue)
int32_t operator =(int32_t newValue)
void setValue(int32_t newValue)
int operator ==(const SoMFInt32 &f) const
int operator !=(const SoMFInt32 &f) const
int32_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 π
Okay so. It's a multiple-value field, and it contains any number of int32_t (32-bit) integers. Any number. Zero? Sure. Forty thousand? Also sure. It's giving infinite slay β¨
When an SoMFInt32 gets written to file, it goes out as one or more integer values, and those values can be in decimal, hexadecimal, or octal format β pick your fighter. And when there's more than one value? They all get wrapped up in square brackets, separated by commas. Iconic little squad. Like this:
[ 17, -0xE20, -518820 ]
π METHODS π
static SoType getClassTypeId()virtual void getTypeId() const
Returns the type for this class, or for a particular object of this class. Type check, but make it official π
int32_t operator [](int i) const
Returns the i'th value of the field. β οΈ But heads up bestie: indexing past the end of the field (like, passing in i greater than getNum()) will return garbage. Not an error, not a warning β just garbage. Main character risk fr.
const int32_t * getValues(int start) const
Returns a pointer into the array of values in the field, starting at index start. These values are read-only β look, don't touch. If you actually wanna modify values in place, go see the startEditing() / finishEditing() methods instead π«Ά
int find(int32_t 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, -1 is returned. And if you set addIfNotFound, then targetValue gets added to the end of the array β but (plot twist) -1 is still returned. No cap.
void setValues(int start, int num, const int32_t *newValues)
Sets num values starting at index start to the values in newValues. The array will automatically be made larger to accommodate the new values if necessary. It just grows for you. Growth mindset π
void set1Value(int index, int32_t newValue)
Sets the index'th value in the array to newValue. The array will be automatically expanded if necessary. One value, one slot, zero stress β¨
int32_t operator =(int32_t newValue)void setValue(int32_t newValue)
Sets the first value in the array to newValue, and then deletes the second value and every value after it. So likeβ¦ it clears the whole group chat and leaves one message. Brutal but efficient π
int operator ==(const SoMFInt32 &f) constint operator !=(const SoMFInt32 &f) const
Returns TRUE if all of the values of this field equal (or do not equal) those of the given field. And here's the catch, so listen: 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. Different type, different vibe, FALSE. Periodt.
int32_t * startEditing()void finishEditing()
startEditing() returns a pointer to the internally-maintained array, and that array can be modified. You can change the values in the array β but you cannot add or remove values. That's the deal.
π¨ Real talk: it is illegal to call any other editing methods betweenstartEditing()andfinishEditing()β likeset1Value(),setValue(), etc. Do not do it. I'm begging.
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 dramatic like that π
and that's the whole page, bestie β go forth and int32 responsibly π
This was the SoMFInt32(3IV) manual page, brought to you by the version stamped right there in the corner, with no date on the tin so don't @ me. 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