SOMFPLANE(3iv)
π SoMFPlane π
okay bestie, gather round, because today we're talking about SoMFPlane β it's an inventor man page, section 3IV, and it's literally just a field that holds one or more plane equations. that's it. that's the girl. π©οΈβ¨
πΈ INHERITS FROM πΈ
lowkey a whole family tree, and she's at the bottom of it:
SoField > SoMField > SoMFPlane
so like, everything SoField can do? she can do. everything SoMField can do? also her. she's the main character of the inheritance chain fr fr π
β¨ SYNOPSIS β¨
first things first, you gotta pull her in:
#include <Inventor/fields/SoMFPlane.h>
π Methods from class SoMFPlane
these are her own methods, her signature moves:
static SoType getClassTypeId()
virtual void getTypeId() const
SbPlane operator [](int i) const
const SbPlane * getValues(int start) const
int find(SbPlane targetValue, SbBool addIfNotFound =
FALSE)
void setValues(int start, int num, const SbPlane
*newValues)
void set1Value(int index, SbPlane newValue)
SbPlane operator =(SbPlane newValue)
void setValue(SbPlane newValue)
int operator ==(const SoMFPlane &f) const
int operator !=(const SoMFPlane &f) const
SbPlane * startEditing()
void finishEditing()
π Methods from class SoMField
the stuff she inherited from her mom, 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
and the stuff from grandma SoField, the OG:
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, a field containing one or more plane equations. simple. elegant. iconic.
SoMFPlanes get written to file as groups of four floating point values, separated by whitespace. and in each little set of four? the first three are the normal direction of the plane, and the fourth is the distance of the plane from the origin (in the direction of the normal). so it's like normal_x normal_y normal_z distance, got it? π§
and when there's more than one value? the whole thing gets wrapped in square brackets and separated by commas. like this bestie:
[ 1 0 0 0, .707 .707 0 100, ]
ate. no crumbs. π
π₯ METHODS π₯
static SoType getClassTypeId()
virtual void getTypeId() const
returns the type for this class, or for a particular object of this class. type-checking queen. π
SbPlane operator [](int i) const
returns the i'th value of the field. but bestie, listen β indexing past the end of the field (passing in i greater than getNum()) will return garbage. garbage!! not a crash, not an error, just vibes that are wrong. so don't. ππ
const SbPlane * getValues(int start) const
hands you a pointer into the array of values in the field, starting at index start. these values are read-only β do not touch, do not edit, they are not yours. if you do wanna modify values in place, go see the startEditing()/finishEditing() methods. that's the way. β¨
int find(SbPlane targetValue, SbBool addIfNotFound = FALSE)
looks for the given value in the array and returns the index of that value. if it's not found, -1 is returned. and if you set addIfNotFound, then targetValue gets added to the end of the array β but heads up, -1 is still returned. yes really. she found nothing and then added it anyway. make it make sense. π
void setValues(int start, int num, const SbPlane *newValues)
sets num values starting at index start to the values in newValues. and the array will automatically be made larger to accommodate the new values, if necessary. she grows for you. π±
void set1Value(int index, SbPlane newValue)
sets the index'th value in the array to newValue. the array will automatically be expanded, if necessary. one value, one slot, no stress. π
SbPlane operator =(SbPlane newValue)
void setValue(SbPlane newValue)
sets the first value in the array to newValue, and then deletes the second and subsequent values. bye besties, only one survivor. π
int operator ==(const SoMFPlane &f) const
int operator !=(const SoMFPlane &f) const
returns TRUE if all of the values of this field equal (or, for !=, do not equal) those of the given field. and here's the important part β 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. nope. not the same. different type, different girl. periodt. π«
SbPlane * startEditing()
void finishEditing()
startEditing() returns a pointer to the internally-maintained array, and that one you can actually modify. 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()β likeset1Value(),setValue(), etc. illegal!! do not do crimes in the edit window. π¨
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. yes, she announces a change that didn't happen. she's dramatic like that. π
β¨
and that's the whole page, bestie!! π«Ά
this was SoMFPlane(3IV)() β that's the page footer right there, source/version and date and everything, all wrapped up in one little SoMFPlane(3IV)() bow. go forth and make planes. ily. ππ¦πΈ
π¦ 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