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 inigreater thangetNum()) 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 indexstart. the values are read-only; if you wanna modify values in place, see thestartEditing()/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,-1is returned. and ifaddIfNotFoundis set, thentargetValuegets added to the end of the array β but-1is 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)β setsnumvalues starting at indexstartto the values innewValues. 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 theindex'th value in the array tonewValue. 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 tonewValue, and deletes the second and subsequent values. so like. everyone else is getting evicted. bye. πint operator ==(const SoMFMatrix &f) constint operator !=(const SoMFMatrix &f) constβ returnsTRUEif all of the values of this field equal (do not equal) those of the given field. but if the fields are different types,FALSEwill always be returned β even if one field is anSoMFFloatwith one value of1.0and the other is anSoMFIntwith a value of1, 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 betweenstartEditing()andfinishEditing()(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. π¦πΈππ
π«Άππβππ§π
π¦ 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