SOMFVEC4F(3iv)

✨ SoMFVec4f(3IV) ✨

okay bestie, welcome to the manual page for SoMFVec4f β€” that's the title, that's the manual (3IV), and yes we're doing the whole thing together. grab a snack πŸ“

πŸ’– NAME πŸ’–

SoMFVec4f β€” a multiple-value field containing any number of four-dimensional vectors. that's her. that's the whole vibe. πŸ’…


🌸 INHERITS FROM 🌸

SoField > SoMField > SoMFVec4f

she comes from a whole line of iconic ancestors, we love a family tree πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/fields/SoMFVec4f.h>

🫢 Methods from class SoMFVec4f 🫢

void                setValues(int start, int num, const float xyzw[][4])
void                set1Value(int index, float x, float y, float z, float
                         w)
void                set1Value(int index, const float xyzw[4])
void                setValue(float x, float y, float z, float w)
void                setValue(const float xyzw[4])
static SoType       getClassTypeId()
virtual void        getTypeId() const
const SbVec4f &     operator [](int i) const
const SbVec4f *     getValues(int start) const
int                 find(const SbVec4f & targetValue, SbBool addIfNotFound
                         = FALSE)
void                setValues(int start, int num, const SbVec4f
                         *newValues)
void                set1Value(int index, const SbVec4f & newValue)
const SbVec4f &     operator =(const SbVec4f & newValue)
void                setValue(const SbVec4f & newValue)
int                 operator ==(const SoMFVec4f &f) const
int                 operator !=(const SoMFVec4f &f) const
SbVec4f *           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 what is she? a multiple-value field that contains any number of four-dimensional vectors. lowkey simple, highkey powerful. πŸ’ͺ

SoMFVec4fs are written to file as one or more triples of floating point values separated by whitespace. (yep β€” the page says triples, bestie, i'm quoting it exactly 🫢)

when more than one value is present, all of the values are enclosed in square brackets and separated by commas, like:

[ 0 0 0, 1.2 3.4 5.6, 98.6 -4e1 212 ]

look at her go ✨


πŸ’… METHODS πŸ’…

  • void setValues(int start, int num, const float xyzw[][4]) β€” sets num values starting at index start to the given floating point values. and heads up: there must be num*4 values in the passed array, no cap. πŸ™ˆ
  • void set1Value(int index, float x, float y, float z, float w)
  • void set1Value(int index, const float xyzw[4]) β€” sets the index'th value to the given floating point values. just the one, bestie. πŸŽ€
  • void setValue(float x, float y, float z, float w)
  • void setValue(const float xyzw[4]) β€” sets the field to contain the given value and only the given value. if the array had multiple values before? they're deleted. gone. bye. it's giving main character energy only. πŸ’€
  • 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" but make it typed. ⭐
  • const SbVec4f & operator [](int i) const β€” returns the i'th value of the field. ⚠️ but indexing past the end of the field (passing in i greater than getNum()) will return garbage. not a cute surprise, just garbage. don't do it. πŸ—‘οΈ
  • const SbVec4f * getValues(int start) const β€” returns a pointer into the array of values in the field, starting at index start. these values are read-only, bestie β€” if you wanna modify values in place, go see the startEditing()/finishEditing() methods. πŸ”’
  • int find(const SbVec4f & 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. if addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned). yes she adds it and still tells you she didn't find it. iconic behaviour honestly. 😭
  • void setValues(int start, int num, const SbVec4f *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 for you, no notes. 🌱
  • void set1Value(int index, const SbVec4f & newValue) β€” sets the index'th value in the array to newValue. the array will be automatically expanded, if necessary. ✨
  • const SbVec4f & operator =(const SbVec4f & newValue)
  • void setValue(const SbVec4f & newValue) β€” sets the first value in the array to newValue, and deletes the second and subsequent values. first place only, everyone else pack it up. πŸ‘‘
  • int operator ==(const SoMFVec4f &f) const
  • int operator !=(const SoMFVec4f &f) const β€” returns TRUE if all of the values of this field equal (do not equal) those of the given field. 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, for example. no cross-type romances here, she's strict. πŸš«πŸ’•
  • SbVec4f * 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. and it is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc). do not test her. 🚨

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. she's telling everyone regardless, and honestly? respect. πŸ“£


and that's the whole page, bestie!! every flag, every signature, every warning, all of it, slayed. πŸ’–

the lil stamp at the bottom of this page reads SoMFVec4f(3IV) β€” that's the source/version she's filed under, with no date attached (timeless, fr fr). mwah, go forth and set some vectors 🧚✨