SOMFFLOAT(3iv)
π SoMFFloat(3IV) β ok bestie, gather round π
SoMFFloat is a multiple-value field that holds any number of floating point values. That's the whole vibe. This is the SoMFFloat(3IV) manual page, and yes, I'm gonna walk you through every single method like we're studying together at 2am. π«Ά
β¨ NAME β¨
SoMFFloat β multiple-value field containing any number of floating point values
No cap, that's it. That's the name. π
𧬠INHERITS FROM π§¬
SoField > SoMField > SoMFFloat
She comes from a whole lineage, okay? SoField at the top, then SoMField, then our girl SoMFFloat. Generational talent fr fr. π
π SYNOPSIS π
Include her like this:
#include <Inventor/fields/SoMFFloat.h>
π Methods from class SoMFFloat π
static SoType getClassTypeId()
virtual void getTypeId() const
float operator [](int i) const
const float * getValues(int start) const
int find(float targetValue, SbBool addIfNotFound = FALSE)
void setValues(int start, int num, const float *newValues)
void set1Value(int index, float newValue)
float operator =(float newValue)
void setValue(float newValue)
int operator ==(const SoMFFloat &f) const
int operator !=(const SoMFFloat &f) const
float * 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, <mint>SoMFFloat</mint> is a multiple-value field that contains any number of floating point values. Any number!! She's flexible like that. π
When SoMFFloats get written to a file, they show up as one or more values in standard scientific notation. And when there's more than one value? The whole squad gets wrapped in square brackets and separated by commas. Like this, bestie:
[ 1.0, 2.3, 5, 6.2e4, -100, ]
And yes β the last comma is optional. Trailing comma girlies, you're valid. π
π METHODS π
static SoType getClassTypeId()virtual void getTypeId() const
Returns the type for this class or a particular object of this class. Type check, but make it iconic. β¨
float operator [](int i) const
Returns the i'th value of the field. β οΈ Heads up though: indexing past the end of the field β like passing in an i greater than getNum() β will return garbage. Not a cute surprise. Not the good kind of chaos. Garbage. π
const float *getValues(int start) const
Returns a pointer into the array of values in the field, starting at index start. These values are read-only, okay? If you wanna modify values in place, go look at the startEditing() / finishEditing() methods instead. No touching. π«Ά
int find(float 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 addIfNotFound is set, then targetValue gets added to the end of the array β but plot twist, -1 is still returned. π So don't let the -1 fool you, she did the thing.
void setValues(int start, int num, const float *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. Growth mindset, literally. π±
void set1Value(int index, float newValue)
Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary. She just makes room. No drama. π
float operator =(float newValue)void setValue(float newValue)
Sets the first value in the array to newValue, and deletes the second and subsequent values. It's giving "clean slate, main character energy." Only one survives. π₯
int operator ==(const SoMFFloat &f) constint operator !=(const SoMFFloat &f) const
Returns TRUE if all of the values of this field equal (or do not equal) those of the given field. β οΈ And 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. Like... yes they're both "one" but no, they are not the same. Different type, different story. π
βοΈ
float *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. π«
It is illegal to call any other editing methods betweenstartEditing()andfinishEditing()β e.g.set1Value(),setValue(), etc. Do not do it. The rules are the rules. π
Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. So it's like... quiet mode. π€«
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. Even if nothing happened!! She's telling everyone anyway. π£ Periodt.
π okay that's the whole page, bye bestie π
This was the SoMFFloat(3IV) page, straight from the SoMFFloat(3IV) manual β the source/version line and the date live down at the bottom of the original, right where the footer sits, and this is me blowing you a kiss from that exact spot. πβ¨π¦ Go forth and hold those floats. πΈππ«Ά
π¦ 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