SoField(3)
๐ NAME ๐
SoField โ she's the top-level abstract base class for fields. That's the whole assignment. This is the Coin page for SoField(3), and ngl bestie, she's the blueprint every other field class is out here copying. ๐
โจ SYNOPSIS โจ
#include <Inventor/fields/SoField.h>
Inherited by SoMField, and SoSField.
๐ Public Types
enum FieldType { NORMAL_FIELD = 0, EVENTIN_FIELD, EVENTOUT_FIELD,
EXPOSED_FIELD }
๐ Public Member Functions
virtual ~SoField ()void setIgnored (SbBool ignore)SbBool isIgnored (void) constvoid setDefault (SbBool defaultVal)SbBool isDefault (void) constvirtual SoType getTypeId (void) const =0SbBool isOfType (const SoType type) constvoid enableConnection (SbBool flag)SbBool isConnectionEnabled (void) constSbBool connectFrom (SoEngineOutput *master, SbBool notnotify=FALSE, SbBool append=FALSE)SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=FALSE)void disconnect (SoEngineOutput *engineoutput)SbBool isConnectedFromEngine (void) constSbBool getConnectedEngine (SoEngineOutput *&master) constSbBool connectFrom (SoField *master, SbBool notnotify=FALSE, SbBool append=FALSE)SbBool appendConnection (SoField *master, SbBool notnotify=FALSE)void disconnect (SoField *field)SbBool isConnectedFromField (void) constSbBool getConnectedField (SoField *&master) constint getNumConnections (void) constint getForwardConnections (SoFieldList &slavelist) constint getConnections (SoFieldList &masterlist) constvoid disconnect (void)SbBool isConnected (void) constvoid setContainer (SoFieldContainer *cont)SoFieldContainer * getContainer (void) constSbBool set (const char *valuestring)void get (SbString &valuestring)SbBool shouldWrite (void) constvirtual void touch (void)virtual void startNotify (void)virtual void notify (SoNotList *nlist)SbBool enableNotify (SbBool on)SbBool isNotifyEnabled (void) constvoid addAuditor (void *f, SoNotRec::Type type)void removeAuditor (void *f, SoNotRec::Type type)int operator== (const SoField &f) constint operator!= (const SoField &f) constvirtual void connectionStatusChanged (int numconnections)SbBool isReadOnly (void) constvirtual SbBool isSame (const SoField &f) const =0virtual void copyFrom (const SoField &f)=0virtual void fixCopy (SbBool copyconnections)virtual SbBool referencesCopy (void) constvoid copyConnection (const SoField *fromfield)virtual SbBool read (SoInput *input, const SbName &name)virtual void write (SoOutput *out, const SbName &name) constvirtual void countWriteRefs (SoOutput *out) constvoid setFieldType (int type)int getFieldType (void) constSbBool getDirty (void) constvoid setDirty (SbBool dirty)void evaluate (void) const
๐ธ Static Public Member Functions
static void initClass (void)static void initClasses (void)static void cleanupClass (void)static SoType getClassTypeId (void)
๐ฆ Protected Member Functions
SoField (void)void valueChanged (SbBool resetdefault=TRUE)virtual void evaluateConnection (void) constvirtual SbBool readValue (SoInput *in)=0virtual void writeValue (SoOutput *out) const =0virtual SbBool readConnection (SoInput *in)virtual void writeConnection (SoOutput *out) constSbBool isDestructing (void) constvirtual SoNotRec createNotRec (SoBase *cont)
๐ Detailed Description ๐
The SoField class is the top-level abstract base class for fields. Say it with me: top-level, abstract, base class. ๐
Fields is the mechanism used throughout Coin for encapsulating basic data types to detect changes made to them, and to provide conversion, import and export facilities.
Almost all public properties in nodes are stored in fields, and so are the inputs and outputs of engines. So fields can be viewed as the major mechanism for scene graph nodes and engines to expose their public API.
Forcing data modification to go through a public function interface while hiding the data members makes it possible to automatically detect and react upon changes in the data structures set up by the application programmer.
E.g. the default behavior when changing the value of a field in a scene graph node is that there'll automatically be a chain of notifications โ from the field to the owner node, from that node to its parent node, etc all the way through to the top-most root node, where the need for a rendering update will be signaled to the application.
(This notification mechanism is the underlying feature that makes the Coin library classify as a so-called data-driven scene graph API.
The practical consequences of this is that rendering and many other processing actions is default scheduled to only happen when something has changed in the retained data structures, making the Coin library under normal circumstances much less CPU intensive than so-called "application-driven" scene graph API, like for instance SGI IRIS Performer, which are continuously re-rendering even when nothing has changed in the data structures or with the camera viewport.)
Storing data members as fields also provides other conveniences for the application programmer:
- Fields can be connected to other fields. This makes it for instance possible to have "self-updating" scenes, i.e. you can set up scenes where entities automatically react to changes in other entities. This also provides a necessary mechanism for having "auto-animating" scenes, as it is possible to connect any field to the global field named
realTime, providing a wall-clock timer. - When connecting fields to each other, Coin has built-in mechanisms for automatically converting between different field types.
- Fields provide persistence for scene graph import (and export) operations. This includes animating entities, so animations can be stored within ordinary Inventor format files.
- Fields provides features for introspection: they have a type-system, just like for nodes and actions, they are named, and it is also possible to find out which node, engine or other entity owns a field.
- Fields can hold multiple values. Multi-value fields comes with a much higher level interface abstraction than standard C/C++ arrays.
Note: there are some field classes which have been obsoleted from the Open Inventor API. They are:SoSFLong,SoSFULong,SoMFLongandSoMFULong. You should use these classes instead (respectively):SoSFInt32,SoSFUInt32,SoMFInt32andSoMFUInt32. ๐จ
For extending the Coin library with your own classes, we strongly recommend that you make yourself acquainted with the excellent The Inventor Toolmaker book (ISBN 0-201-62493-1), which describes the tasks involved in detail. This book was written by the original SGI Inventor designers and explains many of the underlying design ideas, as well as having lots of hands-on examples on how to extend the Coin toolkit in ways that are true to the fundamental design ideas. (The Inventor Toolmaker is also available at SGI's online library, at no cost. See Download The Inventor Toolmaker.) Reading the source code of the built-in classes in Coin should also prove very helpful.
See also SoFieldContainer, SoFieldData
๐ฅ Constructor & Destructor Documentation ๐ฅ
SoField::~SoField () [virtual]
Destructor. Disconnects ourself from any connected field or engine before we disconnect all auditors on the field. She's leaving, but she's leaving tidy. ๐ซถ
SoField::SoField (void ) [protected]
This is the base constructor for field classes. It takes care of doing the common parts of data initialization in fields.
๐ Member Function Documentation ๐
void SoField::initClass (void ) [static]
Internal method called upon initialization of the library (from SoDB::init()) to set up the type system.
void SoField::initClasses (void ) [static]
Initialize all the field classes.
void SoField::cleanupClass (void ) [static]
This static method cleans up static data of the SoField class.
void SoField::setIgnored (SbBool ignore)
Sets the flag which indicates whether or not the field should be ignored during certain operations.
The effect of this flag depends on what type of field it is used on, and the type of the node which includes the field.
This flag is represented in Inventor files by a ~ behind the field name. The flag is in other words persistent.
See also isIgnored()
SbBool SoField::isIgnored (void ) const
Returns the ignore flag.
See also setIgnored()
void SoField::setDefault (SbBool def)
Set whether or not this field should be marked as containing a default value.
See also isDefault()
SbBool SoField::isDefault (void ) const
Check if the field contains its default value. Fields which have their default value intact will normally not be included in the output when writing scene graphs out to a file, for instance.
See also setDefault()
virtual SoType SoField::getTypeId (void ) const [pure virtual]
Returns the type identification instance which uniquely identifies the Coin field class the object belongs to.
See also getClassTypeId(), SoType
Implemented in SoMFBitMask, SoMFBool, SoMFColor, SoMFColorRGBA, SoMFDouble, SoMFEngine, SoMFEnum, SoMFFloat, SoMFInt32, SoMFMatrix, SoMFName, SoMFNode, SoMFPath, SoMFPlane, SoMFRotation, SoMFShort, SoMFString, SoMFTime, SoMFUInt32, SoMFUShort, SoMFVec2b, SoMFVec2d, SoMFVec2f, SoMFVec2i32, SoMFVec2s, SoMFVec3b, SoMFVec3d, SoMFVec3f, SoMFVec3i32, SoMFVec3s, SoMFVec4b, SoMFVec4d, SoMFVec4f, SoMFVec4i32, SoMFVec4s, SoMFVec4ub, SoMFVec4ui32, SoMFVec4us, SoSFBitMask, SoSFBool, SoSFBox2d, SoSFBox2f, SoSFBox2i32, SoSFBox2s, SoSFBox3d, SoSFBox3f, SoSFBox3i32, SoSFBox3s, SoSFColor, SoSFColorRGBA, SoSFDouble, SoSFEngine, SoSFEnum, SoSFFloat, SoSFImage3, SoSFImage, SoSFInt32, SoSFMatrix, SoSFName, SoSFNode, SoSFPath, SoSFPlane, SoSFRotation, SoSFShort, SoSFString, SoSFTime, SoSFTrigger, SoSFUInt32, SoSFUShort, SoSFVec2b, SoSFVec2d, SoSFVec2f, SoSFVec2i32, SoSFVec2s, SoSFVec3b, SoSFVec3d, SoSFVec3f, SoSFVec3i32, SoSFVec3s, SoSFVec4b, SoSFVec4d, SoSFVec4f, SoSFVec4i32, SoSFVec4s, SoSFVec4ub, SoSFVec4ui32, and SoSFVec4us.
SoType SoField::getClassTypeId (void ) [static]
Returns a unique type identifier for this field class.
See also getTypeId(), SoType
SbBool SoField::isOfType (const SoType type) const
Check if this instance is of a derived type or is the same type as the one given with the type parameter.
void SoField::enableConnection (SbBool flag)
This sets a flag value which indicates whether or not the set up connection should be considered active. For as long as the "enableconnection" flag is FALSE, no value propagation will be done from any connected source field, engine or interpolator into this field.
If the connection is first disabled and then enabled again, the field will automatically be synchronized with any master field, engine or interpolator.
Also peep isConnectionEnabled() ๐
SbBool SoField::isConnectionEnabled (void ) const โจ
Okay so this one is just gonna tell you the current status of the connection enabled flag. Like, is it on or off? That's it. ๐
See also: enableConnection()
SbBool SoField::connectFrom (SoEngineOutput * master, SbBool notnotify = FALSE, SbBool append = FALSE) ๐ฅ
Connects this field as a slave to master. So like, the value of this field will be automatically updated when master changes (as long as the connection also is enabled). It's giving "I'm yours, update me". ๐
If this field had any master-relationships beforehand, these are all broken up if append is FALSE. No cap, they're gone.
Call with notnotify if you want to avoid the initial notification of connected auditors (a.k.a. slaves). Lowkey polite.
Function will return TRUE unless:
- If the field output connected from is of a different type from the engine output field-type connected to, a field converter is inserted. For some combinations of fields no such conversion is possible, and we'll return
FALSE. ๐ญ - If this field is already connected to the master, we will return
FALSE. ๐
See also: enableConnection(), isConnectionEnabled(), isConnectedFromField(), getConnectedField(), appendConnection(SoEngineOutput *)
SbBool SoField::appendConnection (SoEngineOutput * master, SbBool notnotify = FALSE) ๐ฆ
Connect ourself as slave to another object, while still keeping the other connections currently in place. So you can have multiple connections and not break up with any of them. Polyamory for fields. ๐ธ
See also: connectFrom()
void SoField::disconnect (SoEngineOutput * master) ๐
Disconnect this field as a slave from master. It's not me, it's you. ๐
SbBool SoField::isConnectedFromEngine (void ) const โญ
Returns TRUE if we're connected from an engine. Simple. Slay.
See also: isConnected(), isConnectedFromField(), connectFrom(SoEngineOutput *)
SbBool SoField::getConnectedEngine (SoEngineOutput *& master) const ๐
Returns TRUE if we are connected as a slave to at least one engine. master will be set to the source of the last engine connection made. So you get the last one. Iconic.
See also: isConnectedFromEngine(), connectFrom(SoEngineOutput *), appendConnection(SoEngineOutput *)
SbBool SoField::connectFrom (SoField * master, SbBool notnotify = FALSE, SbBool append = FALSE) ๐
Connects this field as a slave to master. This means that the value of this field will be automatically updated when master is changed (as long as the connection also is enabled). Same as the engine one, but for fields. Periodt.
If this field had any connections to master fields beforehand, these are all broken up if append is FALSE. Bye to the old connections.
Call with notnotify if you want to avoid the initial notification of connected auditors (a.k.a. slaves).
Function will return TRUE unless:
- If the field connected from has a different type from the field connected to, a field converter is inserted. For some combinations of fields no such conversion is possible, and we'll return
FALSE. ๐ญ - If this field is already connected to the master, we will return
FALSE. ๐
See also: enableConnection(), isConnectionEnabled(), isConnectedFromField(), getConnectedField(), appendConnection(SoField *)
SbBool SoField::appendConnection (SoField * master, SbBool notnotify = FALSE) ๐
Connect ourself as slave to another object, while still keeping the other connections currently in place. Keep all your faves. ๐
See also: connectFrom()
void SoField::disconnect (SoField * master) ๐
Disconnect this field as a slave from master. Moving on. ๐
SbBool SoField::isConnectedFromField (void ) const ๐ธ
Returns TRUE if we're a slave of at least one field. Yass.
See also: isConnected(), isConnectedFromEngine(), connectFrom(SoField *)
SbBool SoField::getConnectedField (SoField *& master) const ๐ง
Returns TRUE if we are connected as a slave to at least one other field. master will be set to the source field in the last field connection made. Main character energy.
See also: isConnectedFromField(), connectFrom(SoField *), appendConnection(SoField *)
int SoField::getNumConnections (void ) const ๐ข
Returns number of fields this field is a slave of. How many masters you got? ๐
See also: getConnections()
int SoField::getForwardConnections (SoFieldList & slavelist) const ๐
Appends all the fields which are auditing this field in slavelist, and returns the number of fields which are our slaves. So many slaves, we love to see it. ๐
int SoField::getConnections (SoFieldList & masterlist) const ๐
Returns number of masters this field is connected to, and places pointers to all of them into masterlist. Note that we replace the contents of masterlist, i.e. we're not appending new data. So don't @ me if your old data is gone. ๐
See also: getNumConnections()
void SoField::disconnect (void ) ๐ซ
Disconnect all connections from this field as a slave to master fields or engine outputs. It's giving "clean slate". โจ
SbBool SoField::isConnected (void ) const โ
Returns TRUE if we're connected from another field, engine or interpolator. Vibe check passed.
See also: isConnectedFromField(), isConnectedFromEngine(), connectFrom()
void SoField::setContainer (SoFieldContainer * cont) ๐ฆ
Let the field know to which container it belongs. Like, "you're with me now". ๐
See also: getContainer(), SoFieldContainer
SoFieldContainer * SoField::getContainer (void ) const ๐
Returns the SoFieldContainer object "owning" this field. Finders keepers.
See also: SoFieldContainer, setContainer()
SbBool SoField::set (const char * valuestring) โ๏ธ
Set the field's value through the given valuestring. The format of the string must adhere to the ASCII format used in Coin data format files. Only the value should be specified - not the name of the field. So don't be extra.
FALSE is returned if the field value is invalid for the field type and can't be parsed in any sensible way. ๐ญ
See also: get()
void SoField::get (SbString & valuestring) ๐ค
Returns the field's value as an ASCII string in the export data format for Inventor files. It's giving "data export realness". ๐
See also: set()
SbBool SoField::shouldWrite (void ) const ๐
Returns TRUE if it is necessary to write the field when dumping a scene graph. This needs to be done if the field is not default (it has been changed from its default value), if it is ignored, or if it is connected from another field or engine. So basically, if it's not basic. ๐
void SoField::touch (void ) [virtual] ๐
Notify the field as well as the field's owner / container that it has been changed. Touching a field which is part of any component (engine or node) in a scene graph will lead to a forced redraw. This is useful if you have been doing several updates to the field wrapped in a pair of enableNotify() calls to notify the field's auditors that its value has changed. So like, batch your updates and then touch it. Periodt.
See also: setValue(), enableNotify()
Reimplemented in SoSFTrigger.
void SoField::startNotify (void ) [virtual] ๐
Trigger a notification sequence. At the end of a notification sequence, all "immediate" sensors (i.e. sensors set up with a zero priority) are triggered. So they get the tea immediately. โ
Reimplemented in SoSFTrigger.
void SoField::notify (SoNotList * nlist) [virtual] ๐ฃ
Notify auditors that this field has changed. Spread the word, bestie. ๐ฃ๏ธ
Reimplemented in SoMFPath, SoSFPath, and SoSFTrigger.
SbBool SoField::enableNotify (SbBool on) ๐
This method sets whether notification will be propagated on changing the value of the field. The old value of the setting is returned. So you get the receipts.
See also: isNotifyEnabled()
SbBool SoField::isNotifyEnabled (void ) const ๐
This method returns whether notification of changes to the field value are propagated to the auditors. Are we spilling the tea or not? ๐
See also: enableNotify()
void SoField::addAuditor (void * f, SoNotRec::Type type) ๐ฅ
Add an auditor to the list. All auditors will be notified whenever this field changes its value(s). The more the merrier. ๐
void SoField::removeAuditor (void * f, SoNotRec::Type type) ๐ช
Remove an auditor from the list. Bye, you're not invited to the group chat anymore. ๐ญ
int SoField::operator== (const SoField & f) const ๐ฐ
Checks for equality. Returns 0 if the fields are of different type or the field's value(s) are not equal. So 0 means "not same". No cap.
int SoField::operator!= (const SoField & f) const โ
Returns TRUE if the fields are of different type or have different value. So if they're not twins, it's true. ๐
void SoField::connectionStatusChanged (int numconnections) [virtual] ๐
Called whenever another slave attaches or detaches itself to us. numconnections is the difference in number of connections made (i.e. if stuff is disconnected, numconnections will be a negative number). The default method is empty. Override in subclasses if you want do something special on connections/disconnections. So like, customize your reaction. ๐
SbBool SoField::isReadOnly (void ) const ๐
Returns TRUE if this field should not be written into at the moment the method is called. So don't touch it, it's read-only. ๐
โโ๏ธ
...and to finish the thought from the entry right above this one, no cap: that whole thing about being used internally in Coin during notification and evaluation processes, and normally not being of interest to the application programmer? Yeah. That was the tail end of it. Carry on ๐ซถ
๐ virtual SbBool SoField::isSame (const SoField & f) const [pure virtual]
The vibe check function, fr. It checks for equal type and value(s) โ that's it, that's the whole assignment.
Implemented in literally the entire field family showing up and showing out:
SoMFBitMask, SoMFBool, SoMFColor, SoMFColorRGBA, SoMFDouble, SoMFEngine,
SoMFEnum, SoMFFloat, SoMFInt32, SoMFMatrix, SoMFName, SoMFNode, SoMFPath,
SoMFPlane, SoMFRotation, SoMFShort, SoMFString, SoMFTime, SoMFUInt32,
SoMFUShort, SoMFVec2b, SoMFVec2d, SoMFVec2f, SoMFVec2i32, SoMFVec2s,
SoMFVec3b, SoMFVec3d, SoMFVec3f, SoMFVec3i32, SoMFVec3s, SoMFVec4b,
SoMFVec4d, SoMFVec4f, SoMFVec4i32, SoMFVec4s, SoMFVec4ub, SoMFVec4ui32,
SoMFVec4us, SoSFBitMask, SoSFBool, SoSFBox2d, SoSFBox2f, SoSFBox2i32,
SoSFBox2s, SoSFBox3d, SoSFBox3f, SoSFBox3i32, SoSFBox3s, SoSFColor,
SoSFColorRGBA, SoSFDouble, SoSFEngine, SoSFEnum, SoSFFloat, SoSFImage3,
SoSFImage, SoSFInt32, SoSFMatrix, SoSFName, SoSFNode, SoSFPath, SoSFPlane,
SoSFRotation, SoSFShort, SoSFString, SoSFTime, SoSFTrigger, SoSFUInt32,
SoSFUShort, SoSFVec2b, SoSFVec2d, SoSFVec2f, SoSFVec2i32, SoSFVec2s,
SoSFVec3b, SoSFVec3d, SoSFVec3f, SoSFVec3i32, SoSFVec3s, SoSFVec4b,
SoSFVec4d, SoSFVec4f, SoSFVec4i32, SoSFVec4s, SoSFVec4ub, SoSFVec4ui32,
and SoSFVec4us.
๐ฅ virtual void SoField::copyFrom (const SoField & f) [pure virtual]
Copies the value(s) from f into this field. But bestie, listen โ f must be of the same type as this field. No cross-type shenanigans, the compiler said what it said ๐
Implemented in (yes, the same iconic lineup):
SoMFBitMask, SoMFBool, SoMFColor, SoMFColorRGBA, SoMFDouble, SoMFEngine,
SoMFEnum, SoMFFloat, SoMFInt32, SoMFMatrix, SoMFName, SoMFNode, SoMFPath,
SoMFPlane, SoMFRotation, SoMFShort, SoMFString, SoMFTime, SoMFUInt32,
SoMFUShort, SoMFVec2b, SoMFVec2d, SoMFVec2f, SoMFVec2i32, SoMFVec2s,
SoMFVec3b, SoMFVec3d, SoMFVec3f, SoMFVec3i32, SoMFVec3s, SoMFVec4b,
SoMFVec4d, SoMFVec4f, SoMFVec4i32, SoMFVec4s, SoMFVec4ub, SoMFVec4ui32,
SoMFVec4us, SoSFBitMask, SoSFBool, SoSFBox2d, SoSFBox2f, SoSFBox2i32,
SoSFBox2s, SoSFBox3d, SoSFBox3f, SoSFBox3i32, SoSFBox3s, SoSFColor,
SoSFColorRGBA, SoSFDouble, SoSFEngine, SoSFEnum, SoSFFloat, SoSFImage3,
SoSFImage, SoSFInt32, SoSFMatrix, SoSFName, SoSFNode, SoSFPath, SoSFPlane,
SoSFRotation, SoSFShort, SoSFString, SoSFTime, SoSFTrigger, SoSFUInt32,
SoSFUShort, SoSFVec2b, SoSFVec2d, SoSFVec2f, SoSFVec2i32, SoSFVec2s,
SoSFVec3b, SoSFVec3d, SoSFVec3f, SoSFVec3i32, SoSFVec3s, SoSFVec4b,
SoSFVec4d, SoSFVec4f, SoSFVec4i32, SoSFVec4s, SoSFVec4ub, SoSFVec4ui32,
and SoSFVec4us.
๐งน void SoField::fixCopy (SbBool copyconnections) [virtual]
This one gets called internally after SoField::copyFrom() during scene graph copies. Its whole job is doing whatever cleanup is needed to fix up the field instance after it's gotten a new value โ like, you just got a whole new identity, now let's make sure everything still points where it should โจ
The default method in the SoField superclass does nothing. (Living its quiet life, respect.)
Here's the tea though: the application programmer should normally not need to consider this methodโฆ unless he constructs a complex field type which contains new references to container instances (i.e. nodes or engines). In that case, overriding this method is necessary to update the reference pointers, because they could have been duplicated during the copy operation. So like, only relevant if you're out here building your own custom field types, iykyk.
Reimplemented in SoMFEngine, SoMFNode, SoMFPath, SoSFEngine, SoSFNode, and SoSFPath.
๐ฉป SbBool SoField::referencesCopy (void ) const [virtual]
Returns TRUE if this field has references to any containers in the scene graph which are also duplicated during the copy operation.
โ ๏ธ Note that this method only is valid to call during copy operations. Outside of that window it's giving nothing, don't do it.
Also see the note about the relevance of the fixCopy() method for application programmers โ because it's applicable on this method as well. Same energy, same caveats.
Reimplemented in SoMFEngine, SoMFNode, SoMFPath, SoSFEngine, SoSFNode, and SoSFPath.
๐ void SoField::copyConnection (const SoField * fromfield)
If fromfield contains a connection to another field, make this field also use the same connection. Sharing is caring, bestie ๐ซถ
๐ SbBool SoField::read (SoInput * in, const SbName & name) [virtual]
Reads and sets the value of this field from the given SoInput instance. Returns FALSE if the field value cannot be parsed from the input. (So like, if it can't parse it, it's gonna tell you straight up.)
The second argument is the field's context-specific name, which is typically its unique identifier in its field container.
See also
set(),write()
โ๏ธ void SoField::write (SoOutput * out, const SbName & name) const [virtual]
Write the value of the field to the given SoOutput instance โ and that can be either a memory buffer or a file, in ASCII or in binary format. Versatile queen ๐
See also
get(),read(),SoOutput
๐งฎ void SoField::countWriteRefs (SoOutput * out) const [virtual]
This method is called during the first pass of write operations, to count the number of write references to this field and to "forward" the reference counting operation to the field containers we're connected to. Bookkeeping era ๐
๐ท๏ธ void SoField::setFieldType (int type)
Set type of this field.
The possible values for type is:
0for ordinary fields1foreventInfields2foreventOutfields3for internal fields4for VRML2exposedFieldfields
There are also enum values in SoField.h. Use those, they're cuter than magic numbers, no cap.
๐ int SoField::getFieldType (void ) const
Return the type of this field.
See also
setFieldType()
๐ซง SbBool SoField::getDirty (void ) const
Do we need re-evaluation? That's the question. That's literally the question.
๐งผ void SoField::setDirty (SbBool dirty)
Mark field for re-evaluation (upon the next read operation), but do not trigger a notification. So like, lowkey dirty. Not a whole announcement.
โก void SoField::evaluate (void ) const [inline]
Re-evaluates the value of this field any time a getValue() call is made and the field is marked dirty. This is done in this way to gain the advantages of having lazy evaluation. She doesn't do the work until somebody actually asks โ main character energy honestly ๐
๐ฃ void SoField::valueChanged (SbBool resetdefault = TRUE) [protected]
This method is always called whenever the field's value has been changed by direct invocation of setValue() or some such.
โ ๏ธ You should never call this method from anywhere in the code where the field value is being set through an evaluation of its connections. Don't do it. Not the move.
If resetdefault is TRUE, the flag marking whether or not the field has its default value will be set to FALSE.
The method will also notify any auditors that the field's value has changed. Gossip travels fast ๐
๐ void SoField::evaluateConnection (void ) const [protected], [virtual]
If we're connected to a field/engine/interpolator, copy the value from the master source. Slay, take it from the top.
๐ virtual SbBool SoField::readValue (SoInput * in) [protected], [pure virtual]
Read field value(s). Short and sweet, she's abstract, she doesn't do it herself.
๐๏ธ virtual void SoField::writeValue (SoOutput * out) const [protected], [pure virtual]
Write field value(s). Also abstract. Also iconic.
๐ SbBool SoField::readConnection (SoInput * in) [protected], [virtual]
Read the master field of a field-to-field connection (and its field container).
If input parsing is successful, this field will be connected as a slave to the master field.
โ ๏ธ Note that this slave field will not be marked as "dirty" upon connection, i.e. it will retain its value until the first update of the master field is made after the connection was set up. This to be in conformance with how the Inventor Mentor specifies how field connections should be imported (see page 270). Yes bestie, page 270. Go look. ๐
๐ค void SoField::writeConnection (SoOutput * out) const [protected], [virtual]
Write out information about this field's connection. Spill the whole connection story.
๐ SbBool SoField::isDestructing (void ) const [protected]
Can be used to check if a field is being destructed. RIP to that field, but we're different ๐ชฆ
๐ซถ Author
Generated automatically by Doxygen for Coin from the source code. Not a human, not a bestie, but honestly? It ate. Robots stay winning ๐คโจ
aaaand that's the whole page!! ๐ This was Version 4.0.10, stamped Thu Jun 25 2026 00:00:00, and you just finished reading SoField(3). Go forth and field your connections responsibly, bestie. Mwah ๐
๐ฆ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 ยท BSD-3-Clause AND GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms