SOMFVEC3F(3iv)

okay bestie, welcome to the SoMFVec3f(3IV) page β€” this is the man page for the field that holds a whole pile of 3D vectors, and yes she's serving, let's get into it πŸ’…βœ¨


🌸 NAME 🌸

SoMFVec3f β€” a multiple-value field containing any number of three-dimensional vectors πŸ¦‹


πŸ‘‘ INHERITS FROM πŸ‘‘

SoField > SoMField > SoMFVec3f

Like, she comes from a whole legacy, iykyk. πŸ’–


✨ SYNOPSIS ✨

#include <Inventor/fields/SoMFVec3f.h>

πŸ’« Methods from class SoMFVec3f

void                setValues(int start, int num, const float xyz[][3])
void                set1Value(int index, float x, float y, float z)
void                set1Value(int index, const float xyz[3])
void                setValue(float x, float y, float z)
void                setValue(const float xyz[3])
static SoType       getClassTypeId()
virtual void        getTypeId() const
const SbVec3f &     operator [](int i) const
const SbVec3f *     getValues(int start) const
int                 find(const SbVec3f & targetValue, SbBool addIfNotFound
                         = FALSE)
void                setValues(int start, int num, const SbVec3f
                         *newValues)
void                set1Value(int index, const SbVec3f & newValue)
const SbVec3f &     operator =(const SbVec3f & newValue)
void                setValue(const SbVec3f & newValue)
int                 operator ==(const SoMFVec3f &f) const
int                 operator !=(const SoMFVec3f &f) const
SbVec3f *           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 three-dimensional vectors. Not one vector. ANY NUMBER of vectors. She's flexible like that πŸ’…

SoMFVec3fs get written out to file as one or more triples of floating point values separated by whitespace.

And when there's more than one value in there? All of the values get wrapped in square brackets and separated by commas, like so, bestie:

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

Iconic format. Ate. πŸ”₯


πŸ’… METHODS πŸ’…

void setValues(int start, int num, const float xyz[][3])

Sets num values starting at index start to the given floating point values. And heads up β€” there must be num*3 values in the passed array. Count them, girl. πŸ‘‘

void set1Value(int index, float x, float y, float z)<br>void set1Value(int index, const float xyz[3])

Set the index'th value to the given floating point values. Just the one. One little guy. πŸ“

void setValue(float x, float y, float z)<br>void setValue(const float xyz[3])

Sets the field to contain the given value and only the given value β€” so if the array had multiple values before, they are deleted. It's giving "clean slate, main character energy." 😭

static SoType getClassTypeId()<br>virtual void getTypeId() const

Returns the type for this class, or for a particular object of this class. Standard. ✨

const SbVec3f & operator [](int i) const

Returns the i'th value of the field. But lowkey watch out: indexing past the end of the field (passing in i greater than getNum()) will return garbage. Not a vibe. πŸ’€

const SbVec3f * 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 look at the startEditing()/finishEditing() methods. 🫢

int find(const SbVec3f & targetValue, SbBool addIfNotFound = FALSE)

Finds the given value in the array and returns the index of that value in the array. If the value isn't found, -1 is returned. And if addIfNotFound is set, then targetValue gets added to the end of the array β€” but -1 is still returned anyway. Sneaky little detail, no cap. πŸ™ˆ

void setValues(int start, int num, const SbVec3f *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. She grows πŸ’–

void set1Value(int index, const SbVec3f & newValue)

Sets the index'th value in the array to newValue. The array will be automatically expanded, if necessary. 🌈

const SbVec3f & operator =(const SbVec3f & newValue)<br>void setValue(const SbVec3f & newValue)

Sets the first value in the array to newValue, and deletes the second and subsequent values. Sorry to everyone else in the array, it's not your moment. πŸ’…

int operator ==(const SoMFVec3f &f) const<br>int operator !=(const SoMFVec3f &f) const

Returns TRUE if all of the values of this field equal (do not equal) 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, for example. Type is type, periodt. 🚫

SbVec3f * startEditing()<br>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. 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. Yeah, she announces it regardless. Iconic behavior, honestly. ✨


and that's a wrap on the whole SoMFVec3f(3IV) situation, from the NAME section all the way down to that footer πŸ’œ go forth and hold your three-dimensional vectors, bestie β€” you got this πŸ¦‹πŸŽ€πŸ’–