SOMFSHORT(3iv)
π SoMFShort(3IV)() β the manual page, bestie π
okay so this is SoMFShort(3IV)(), and it's literally the manual for a multiple-value field that holds any number of short integers. no cap, it's giving integer energy π
β¨ NAME β¨
SoMFShort β a multiple-value field containing any number of short integers. that's it, that's the name, and it ate π
π INHERITS FROM π
SoField > SoMField > SoMFShort
so it's got that whole ancestry chain going on, lowkey iconic family tree π³
π¦ SYNOPSIS π¦
#include <Inventor/fields/SoMFShort.h>
Methods from class SoMFShort
static SoType getClassTypeId()
virtual void getTypeId() const
short operator [](int i) const
const short * getValues(int start) const
int find(short targetValue, SbBool addIfNotFound = FALSE)
void setValues(int start, int num, const short *newValues)
void set1Value(int index, short newValue)
short operator =(short newValue)
void setValue(short newValue)
int operator ==(const SoMFShort &f) const
int operator !=(const SoMFShort &f) const
short * 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 short (16-bit) integers. yes, 16-bit, so don't try to put your whole main character energy in there, bestie.
SoMFShorts are written to file as one or more short integer values, represented as decimal, hexadecimal (beginning with '0x') or octal (beginning with '0') values. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:
[ -7, 0xFF, -033 ]
so you can mix and match bases, and the square brackets keep it all together. slay π
π₯ METHODS π₯
static SoType getClassTypeId()andvirtual void getTypeId() constβ returns the type for this class or a particular object of this class. basically it tells you what kind of field you're dealing with, no cap.short operator [](int i) constβ returns thei'th value of the field. but bestie, indexing past the end of the field (passing inigreater thangetNum()) will return garbage. like, actual garbage, not a cute error. so don't do that πconst short * getValues(int start) constβ returns a pointer into the array of values in the field, starting at indexstart. the values are read-only; see thestartEditing()/finishEditing()methods for a way of modifying values in place. so if you wanna touch the values, you gotta use the editing methods, periodt.int find(short 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,-1is returned. ifaddIfNotFoundis set, thentargetValueis added to the end of the array (but-1is still returned). so it's like a little search-and-maybe-add situation, but you still get-1even if it adds it. iconic.void setValues(int start, int num, const short *newValues)β setsnumvalues starting at indexstartto the values innewValues. the array will automatically be made larger to accommodate the new values, if necessary. so it grows on demand, like your tbr pile πvoid set1Value(int index, short newValue)β sets theindex'th value in the array tonewValue. the array will be automatically expanded, if necessary. one value, one index, no stress.short operator =(short newValue)andvoid setValue(short newValue)β sets the first value in the array tonewValue, and deletes the second and subsequent values. so it becomes a one-value field, and the rest are gone. periodt.int operator ==(const SoMFShort &f) constandint operator !=(const SoMFShort &f) constβ returnsTRUEif all of the values of this field equal (do not equal) those of the given field. if the fields are different typesFALSEwill always be returned (even if one field is anSoMFFloatwith one value of1.0and the other is anSoMFIntwith a value of1, for example). so type matters, bestie, don't get it twisted.short * startEditing()andvoid 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. it is illegal to call any other editing methods betweenstartEditing()andfinishEditing()(e.g.set1Value(),setValue(), etc). like, don't even try it, the vibes will be off.
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. so it's like a dramatic reveal, even if nothing changed, the notification still goes out π
that's the whole page, bestie! this manual page is SoMFShort(3IV)() β that's the source/version and date, no cap. mwah πβ¨
π¦ 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