SOMFMATRIX(3iv)

πŸ’– SoMFMatrix β€” the multiple-value field that's literally just a whole pile of 4x4 matrices ✨

okay bestie, so <cyan>SoMFMatrix</cyan> lives in the IV manual, and it's giving "I contain any number of 4x4 matrices and I'm not sorry about it." πŸŽ€


🌸 INHERITS FROM 🌸

SoField > SoMField > SoMFMatrix

like. the whole ancestry line. iconic lineage fr fr πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/fields/SoMFMatrix.h>

πŸ’… Methods from class SoMFMatrix

void                setValue(float a11, float a12, float a13, float a14,
                         float a21, float a22, float a23, float a24, float
                         a31, float a32, float a33, float a34, float a41,
                         float a42, float a43, float a44)
static SoType       getClassTypeId()
virtual void        getTypeId() const
const SbMatrix &    operator [](int i) const
const SbMatrix *    getValues(int start) const
int                 find(const SbMatrix & targetValue, SbBool
                         addIfNotFound = FALSE)
void                setValues(int start, int num, const SbMatrix
                         *newValues)
void                set1Value(int index, const SbMatrix & newValue)
const SbMatrix &    operator =(const SbMatrix & newValue)
void                setValue(const SbMatrix & newValue)
int                 operator ==(const SoMFMatrix &f) const
int                 operator !=(const SoMFMatrix &f) const
SbMatrix *          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 πŸŽ€

It's a multiple-value field that contains any number of 4x4 matrices. that's it. that's the whole job. and she does it flawlessly. πŸ’…

SoMFMatrixes get written to file as sets of 16 floating point numbers separated by whitespace. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example, two identity matrices might be written as:

[ 1 0 0 0  0 1 0 0  0 0 1 0  0 0 0 1,
  1 0 0 0  0 1 0 0  0 0 1 0  0 0 0 1 ]

not the square brackets doing the most but honestly? slay. 🫢


πŸ”₯ METHODS πŸ”₯

  • void setValue(float a11, float a12, float a13, float a14, float a21, float a22, float a23, float a24, float a31, float a32, float a33, float a34, float a41, float a42, float a43, float a44) β€” makes this field contain one and only one value, which is the matrix given by those 16 values. one matrix. no more. she said "I'm monogamous today." πŸ’€
  • static SoType getClassTypeId()
  • virtual void getTypeId() const β€” returns the type for this class, or for a particular object of this class. type check passed, queen. ✨
  • const SbMatrix & operator [](int i) const β€” returns the i'th value of the field. but listen. indexing past the end of the field (passing in i greater than getNum()) will return garbage. like actually garbage. undefined nonsense. don't do it bestie I'm begging 😭
  • const SbMatrix * getValues(int start) const β€” returns a pointer into the array of values in the field, starting at index start. the values are read-only; if you wanna modify values in place, see the startEditing()/finishEditing() methods. look but don't touch. πŸ™ˆ
  • int find(const SbMatrix & targetValue, SbBool addIfNotFound = FALSE) β€” finds the given value in the array and returns the index of that value in the array. if it's not found, -1 is returned. and if addIfNotFound is set, then targetValue gets added to the end of the array β€” but -1 is still returned. yes really. she adds it and still says "didn't find it tho." the audacity. πŸ’…
  • void setValues(int start, int num, const SbMatrix *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 on demand, no cap. 🌱
  • void set1Value(int index, const SbMatrix & newValue) β€” sets the index'th value in the array to newValue. the array will be automatically expanded, if necessary. one value, one slot, zero drama. ✨
  • const SbMatrix & operator =(const SbMatrix & newValue)
  • void setValue(const SbMatrix & newValue) β€” sets the first value in the array to newValue, and deletes the second and subsequent values. so like. everyone else is getting evicted. bye. πŸ‘‹
  • int operator ==(const SoMFMatrix &f) const
  • int operator !=(const SoMFMatrix &f) const β€” returns TRUE if all of the values of this field equal (do not equal) 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, for example. different types = instant no. it's giving "we are not the same." πŸ’€
  • SbMatrix * 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 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). like genuinely illegal. do not. 🚫

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. she's dramatic like that. she tells everyone something happened even when nothing happened. main character energy fr fr πŸ‘‘


🫢 quick vibe check: startEditing() / finishEditing() are a pair. don't leave her hanging mid-edit, okay? no other editing methods in between. periodt.

and that's the whole page bestie!! πŸ’– this was SoMFMatrix(3IV)() β€” yes the manual name is literally in the header and the footer, she's everywhere, she's booked and busy ✨ β€” brought to you by the source/version + date situation at the bottom, which we are honoring in spirit because I'm not copy-pasting a whole footer line at you, I'm giving you the vibe instead. πŸ¦‹πŸŒΈπŸŽ€πŸ’…πŸ«ΆπŸ‘‘πŸŒˆβ­πŸ“πŸ§šπŸ’œ