SoField(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

SoField(3) β€” Library Functions Manual, but make it a group chat πŸ’–

Okay bestie, this is SoField(3), the manual page for the top-level abstract base class for fields. We're doing part 1, and there are more parts coming, so don't go anywhere. ✨


NAME πŸŽ€

SoField β€” the top-level abstract base class for fields. It's giving parent-of-the-whole-field-family energy. πŸ‘‘


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 πŸ’…

The whole public squad, bestie. Every signature exactly as it is, no edits, no skips:

  • virtual ~SoField ()
  • void setIgnored (SbBool ignore)
  • SbBool isIgnored (void) const
  • void setDefault (SbBool defaultVal)
  • SbBool isDefault (void) const
  • virtual SoType getTypeId (void) const =0
  • SbBool isOfType (const SoType type) const
  • void enableConnection (SbBool flag)
  • SbBool isConnectionEnabled (void) const
  • SbBool connectFrom (SoEngineOutput *master, SbBool notnotify=FALSE, SbBool append=FALSE)
  • SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=FALSE)
  • void disconnect (SoEngineOutput *engineoutput)
  • SbBool isConnectedFromEngine (void) const
  • SbBool getConnectedEngine (SoEngineOutput *&master) const
  • SbBool connectFrom (SoField *master, SbBool notnotify=FALSE, SbBool append=FALSE)
  • SbBool appendConnection (SoField *master, SbBool notnotify=FALSE)
  • void disconnect (SoField *field)
  • SbBool isConnectedFromField (void) const
  • SbBool getConnectedField (SoField *&master) const
  • int getNumConnections (void) const
  • int getForwardConnections (SoFieldList &slavelist) const
  • int getConnections (SoFieldList &masterlist) const
  • void disconnect (void)
  • SbBool isConnected (void) const
  • void setContainer (SoFieldContainer *cont)
  • SoFieldContainer * getContainer (void) const
  • SbBool set (const char *valuestring)
  • void get (SbString &valuestring)
  • SbBool shouldWrite (void) const
  • virtual void touch (void)
  • virtual void startNotify (void)
  • virtual void notify (SoNotList *nlist)
  • SbBool enableNotify (SbBool on)
  • SbBool isNotifyEnabled (void) const
  • void addAuditor (void *f, SoNotRec::Type type)
  • void removeAuditor (void *f, SoNotRec::Type type)
  • int operator== (const SoField &f) const
  • int operator!= (const SoField &f) const
  • virtual void connectionStatusChanged (int numconnections)
  • SbBool isReadOnly (void) const
  • virtual SbBool isSame (const SoField &f) const =0
  • virtual void copyFrom (const SoField &f)=0
  • virtual void fixCopy (SbBool copyconnections)
  • virtual SbBool referencesCopy (void) const
  • void copyConnection (const SoField *fromfield)
  • virtual SbBool read (SoInput *input, const SbName &name)
  • virtual void write (SoOutput *out, const SbName &name) const
  • virtual void countWriteRefs (SoOutput *out) const
  • void setFieldType (int type)
  • int getFieldType (void) const
  • SbBool getDirty (void) const
  • void 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) const
  • virtual SbBool readValue (SoInput *in)=0
  • virtual void writeValue (SoOutput *out) const =0
  • virtual SbBool readConnection (SoInput *in)
  • virtual void writeConnection (SoOutput *out) const
  • SbBool isDestructing (void) const

Detailed Description πŸ’–

The SoField class is the top-level abstract base class for fields. That's the whole vibe. πŸ‘‘

Fields are the mechanism used all over Coin for wrapping basic data types, detecting changes made to them, and providing conversion, import and export facilities. They're literally the backbone, bestie.

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 scenegraph nodes and engines to expose their public API. Main character energy, fr fr.

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. The way that works is lowkey iconic.

E.g. the default behavior when changing the value of a field in a scenegraph 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 signalled to the application. It's a whole relay race, and the root node is holding the baton. πŸƒβ€β™€οΈ

(This notification mechanism is the underlying feature that makes the Coin library classify as a so-called data-driven scenegraph API. Yes, that's the tea. β˜•

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" scenegraph 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. So Coin is basically the chill friend who only moves when there's actually something to do. πŸ’…)

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, ie 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. Obsessed with a self-updating scene. πŸ•°οΈ
  • When connecting fields to each other, Coin has built-in mechanisms for automatically converting between different field types. No manual conversions, no drama. ✨
  • Fields provide persistance for scenegraph import (and export) operations. This includes animating entities, so animations can be stored within ordinary Inventor format files. Saving the whole vibe to disk. πŸ’Ύ
  • 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. It's giving detective energy. πŸ”
  • Fields can hold multiple values. Multi-value fields comes with a much higher level interface abstraction than standard C/C++ arrays. Multi-value fields are the upgrade, periodt. πŸ‘‘
Note: there are some field classes which has been obsoleted from the Open Inventor API. They are: SoSFLong, SoSFULong, SoMFLong and SoMFULong. You should use these classes instead (respectively): SoSFInt32, SoSFUInt32, SoMFInt32 and SoMFUInt32. Don't use the old ones, bestie. They're not the moment. πŸ’€

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, aswell 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 sourcecode of the built-in classes in Coin should also provide very helpful. It's the blueprint, bestie. πŸ“–βœ¨

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. It's the polite goodbye. πŸ‘‹

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. The behind-the-scenes setup queen. πŸ‘‘


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. Lowkey essential, highkey internal. βš™οΈ

void SoField::initClasses (void ) [static]

Initialize all the field classes. All of them. Every single one. πŸ’…

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. So that little tilde is doing a lot of work. ✨

See also: isIgnored()

SbBool SoField::isIgnored (void ) const

Returns the ignore flag. Simple as that. πŸŽ€

See also: setIgnored()

void SoField::setDefault (SbBool def)

Set whether or not this field should be marked as containing a default value. You're basically telling it, "bestie, you're default." πŸ’…

See also: isDefault()

SbBool SoField::isDefault (void ) const

Check if the field contains its default value. Fields which has their default value intact will normally not be included in the output when writing scene graphs out to a file, for instance. So if you're default, you might not get written out. It's not personal, it's just efficiency. πŸ¦‹

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. It's the field's ID card. πŸͺͺ

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. That's the whole list, no cap. πŸ“‹

SoType SoField::getClassTypeId (void ) [static]

Returns a unique type identifier for this field class. Unique, like your fave. πŸ’…

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. Basically a vibe check for types. ✨

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. So you can pause the connection and then unpause it, and it catches up. Iconic. πŸ”„

See also: isConnectionEnabled()

SbBool SoField::isConnectionEnabled (void ) const

Return the current status of the connection enabled flag. Is it on? Is it off? This tells you. πŸ’–

See also

  • enableConnection()

πŸ”Œ connectFrom() β€” engine edition

SbBool SoField::connectFrom (SoEngineOutput * master, SbBool notnotify = FALSE, SbBool append = FALSE)

okay so bestie, this one glues your field to master as its slave ✨ which basically means the second master changes, your field's value gets updated too β€” as long as the connection is also enabled, iykyk, the enable part is not optional.

If this field already had some master-relationships going on beforehand, all of those get broken up if append is FALSE. so like, no old boo left behind πŸ’€

Call it with notnotify if you wanna skip the initial notification of connected auditors (a.k.a. slaves). shy girl energy, they don't need to know yet 🫢

The function returns TRUE unless:

  • If the field output you connected from is a different type from the engine output field-type you connected to, a field converter gets inserted. But for some combos of fields no such conversion is possible at all, and then we return FALSE 😭
  • If this field is already connected to the master, we return FALSE. no double-dipping, periodt.

See also

  • enableConnection(), isConnectionEnabled(), isConnectedFromField()
  • getConnectedField(), appendConnection(SoEngineOutput *)

πŸŽ€ appendConnection() β€” engine edition

SbBool SoField::appendConnection (SoEngineOutput * master, SbBool notnotify = FALSE)

Connect ourself as slave to another object, while still keeping the other connections currently in place. it's giving "adding to the roster, not replacing it" πŸ’…

See also

  • connectFrom()

βœ‚οΈ disconnect() β€” engine edition

void SoField::disconnect (SoEngineOutput * master)

Disconnect this field as a slave from master. bye bestie πŸ‘‹


πŸ¦‹ isConnectedFromEngine()

SbBool SoField::isConnectedFromEngine (void ) const

Returns TRUE if we're connected from an engine. literally just a vibe check on whether an engine is our master 🧚

See also

  • isConnected(), isConnectedFromField()
  • connectFrom(SoEngineOutput *)

πŸ‘‘ getConnectedEngine()

SbBool SoField::getConnectedEngine (SoEngineOutput *& master) const

Returns TRUE if we are connected as a slave to at least one engine. and master gets set to the source of the last engine connection made β€” so like, the most recent one, not the first, okurrr.

See also

  • isConnectedFromEngine(), connectFrom(SoEngineOutput *)
  • appendConnection(SoEngineOutput *)

πŸ”— connectFrom() β€” field edition

SbBool SoField::connectFrom (SoField * master, SbBool notnotify = FALSE, SbBool append = FALSE)

Connects this field as a slave to master. Same deal as before: the value of this field gets automatically updated whenever master changes, as long as the connection also is enabled ✨

If this field had any connections to master fields beforehand, all of those get broken up if append is FALSE. clean slate, no leftovers 🧹

Call with notnotify if you wanna avoid that 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 *)

πŸŽ€ appendConnection() β€” field edition

SbBool SoField::appendConnection (SoField * master, SbBool notnotify = FALSE)

Connect ourself as slave to another object, while still keeping the other connections currently in place. again: adding, not replacing, no cap 🌸

See also

  • connectFrom()

βœ‚οΈ disconnect() β€” field edition

void SoField::disconnect (SoField * master)

Disconnect this field as a slave from master. slay, we're free πŸ¦‹


πŸ’œ isConnectedFromField()

SbBool SoField::isConnectedFromField (void ) const

Returns TRUE if we're a slave of at least one field. one is enough, we're not greedy.

See also

  • isConnected(), isConnectedFromEngine()
  • connectFrom(SoField *)

πŸ’– getConnectedField()

SbBool SoField::getConnectedField (SoField *& master) const

Returns TRUE if we are connected as a slave to at least one other field. master gets set to the source field in the last field connection made β€” last one, remember that bestie.

See also

  • isConnectedFromField(), connectFrom(SoField *),
  • appendConnection(SoField *)

πŸ”’ getNumConnections()

int SoField::getNumConnections (void ) const

Returns number of fields this field is a slave of. just a headcount of your masters πŸ’…

See also

  • getConnections()

🌈 getForwardConnections()

int SoField::getForwardConnections (SoFieldList & slavelist) const

Appends all the fields which are auditing this field into slavelist, and returns the number of fields which are our slaves. so it's the other direction β€” who's listening to us πŸ‘‘


πŸ“‹ getConnections()

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 if you had stuff in there, it's gone, sorry bestie 😭

See also

  • getNumConnections()

🧹 disconnect()

void SoField::disconnect (void )

Disconnect all connections from this field as a slave to master fields or engine outputs. scorched earth, block everyone, main character energy ✨


πŸ” isConnected()

SbBool SoField::isConnected (void ) const

Returns TRUE if we're connected from another field, engine or interpolator. the big general vibe check of connection-ness 🫢

See also

  • isConnectedFromField(), isConnectedFromEngine()
  • connectFrom()

🏠 setContainer()

void SoField::setContainer (SoFieldContainer * cont)

Let the field know to which container it belongs. like telling your field where home is πŸŽ€

See also

  • getContainer(), SoFieldContainer

πŸ“¦ getContainer()

SoFieldContainer * SoField::getContainer (void ) const

Returns the SoFieldContainer object "owning" this field. yes the quotes are load-bearing, that's literally how the docs say it πŸ’…

See also

  • SoFieldContainer, setContainer()

✍️ set()

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 out here naming names bestie.

FALSE is returned if the field value is invalid for the field type and can't be parsed in any sensible way. it's giving "we tried, we couldn't, moving on" 😭

See also

  • get()

πŸ“– 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 set()'s mirror selfie πŸ“Έ

See also

  • set()

πŸ–ŠοΈ shouldWrite()

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's ignored, or if it's connected from another field or engine. three reasons, all valid, all real πŸ”₯


πŸ’₯ touch()

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. like a lil "hey everyone, something happened" πŸ“£

See also

  • setValue(), enableNotify()

Reimplemented in SoSFTrigger.


🚨 startNotify()

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 the zero-priority girlies go first, or rather, last-but-immediately, iykyk ⭐

Reimplemented in SoSFTrigger.


πŸ“’ notify()

void SoField::notify (SoNotList * nlist) [virtual]

Notify auditors that this field has changed. that's it, that's the whole job, and honestly? iconic πŸ‘‘

Reimplemented in SoMFPath, SoSFPath, and SoSFTrigger.


πŸ”” enableNotify()

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 before, not the after, okurrr.

See also

  • isNotifyEnabled()

πŸ”• isNotifyEnabled()

SbBool SoField::isNotifyEnabled (void ) const

This method returns whether notification of changes to the field value are propagated to the auditors. the vibe check before you start yelling πŸ’œ

See also

  • enableNotify()

πŸ‘€ addAuditor()

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). it's giving group chat, everyone gets the update ✨


πŸ™ˆ removeAuditor()

void SoField::removeAuditor (void * f, SoNotRec::Type type)

Remove an auditor from the list. leaving the group chat, no hard feelings 🫢


βš–οΈ operator==()

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. zero means no, and that's the whole story πŸ’…


🚫 operator!=()

int SoField::operator!= (const SoField & f) const

Returns TRUE if the fields are of different type or has different value. the drama detector, essentially 😭


πŸ”„ connectionStatusChanged()

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). so like, math but for friendships πŸ’€

The default method is empty. Override in subclasses if you want do something special on connections/deconnections.


πŸ”’ isReadOnly()

SbBool SoField::isReadOnly (void ) const

Returns TRUE if this field should not be written into at the moment the method is called. read the room, and read the flag 🌸

virtual SbBool SoField::isSame (const SoField & f) const [pure virtual]

okay so this one is a pure virtual β€” which is base-class speak for "y'all subclasses figure it out, I'm just the blueprint." πŸ’… It checks for equal type AND value(s). Not type-adjacent, not value-ish β€” same type, same values. that's the vibe check. ✨

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. πŸ¦‹


virtual void SoField::copyFrom (const SoField & f) [pure virtual]

Copies the value(s) from f into this field. 🫢 Major detail though: f must be the same type as this field, or it's a hard no. no cap.

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. πŸ’–


void SoField::fixCopy (SbBool copyconnections) [virtual]

So this gets called internally, right after SoField::copyFrom() during scene graph copies. Its whole job is doing whatever fix-up work the field instance needs now that it's holding a fresh new value. πŸ› οΈ

The default version living in the SoField superclass? Does absolutely nothing. iconic honestly. ✨

As an application programmer you normally don't gotta worry about this β€” unless you're constructing a complex field type that contains new references to container instances (i.e. nodes or engines). In that case overriding it is straight-up necessary, because you gotta update the reference pointers β€” they could've gotten duplicated during the copy operation. 😭

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 that also got duplicated during the copy operation. πŸ‘‘

Heads up bestie: this method is only valid to call during copy operations. any other time? nope, don't. πŸ™ˆ

Also peep the note about how relevant the fixCopy() method is for application programmers β€” it applies to this method aswell. Reimplemented in SoMFEngine, SoMFNode, SoMFPath, SoSFEngine, SoSFNode, and SoSFPath.


void SoField::copyConnection (const SoField * fromfield)

If fromfield contains a connection to another field, then this field gets to use that same connection too. sharing is caring, fr fr. 🫢


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 just can't be parsed from the input. πŸ’€

The second argument is the field's context-specific name β€” which is typically its unique identifier inside its field container. iykyk.

See also: set(), write()


void SoField::write (SoOutput * out, const SbName & name) const [virtual]

Writes the value of the field out to the given SoOutput instance β€” which can be either a memory buffer or a file, in ASCII or in binary format. versatile queen, she does it all. 🌈

See also: get(), read(), SoOutput


void SoField::countWriteRefs (SoOutput * out) const [virtual]

Called during the first pass of write operations. It counts up the number of write references to this field, and then "forwards" that whole reference-counting operation over to the field containers we're connected to. πŸŽ‰


void SoField::setFieldType (int type)

Sets the type of this field. πŸŽ€

The possible values for type are:

  • 0 β€” ordinary fields
  • 1 β€” eventIn fields
  • 2 β€” eventOut fields
  • 3 β€” internal fields
  • 4 β€” VRML2 exposedField fields

There are also enum values in SoField.h. slay. ✨


int SoField::getFieldType (void ) const

Returns the type of this field. πŸ’…

See also: setFieldType()


SbBool SoField::getDirty (void ) const

Do we need re-evaluation? That's literally the whole question. πŸ€”


void SoField::setDirty (SbBool dirty)

Marks the field for re-evaluation (it'll happen upon the next read operation), but β€” key detail β€” does not trigger a notification. quiet mode activated. 🀫


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. It's done this way so we can gain all the advantages of having lazy evaluation. obsessed with the efficiency tbh. πŸ”₯


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.

Lowkey critical: you should never call this method from anywhere in your code where the field value is being set through an evaluation of its connections.

If resetdefault is TRUE, then the flag marking whether or not the field has its default value gets set to FALSE.

The method will also notify any auditors that the field's value has changed. πŸ“£


void SoField::evaluateConnection (void ) const [protected], [virtual]

If we're connected to a field / engine / interpolator, copy the value over from the master source. 🧚


virtual SbBool SoField::readValue (SoInput * in) [protected], [pure virtual]

Read field value(s). that's the job, that's the whole assignment. πŸ’–


virtual void SoField::writeValue (SoOutput * out) const [protected], [pure virtual]

Write field value(s). periodt. πŸ’…


SbBool SoField::readConnection (SoInput * in) [protected], [virtual]

Reads the master field of a field-to-field connection (and its field container too). πŸ”—

If input parsing is successful, this field will get connected as a slave to the master field.

Note: this slave field will not be marked as "dirty" upon connection β€” meaning it keeps its value until the first update of the master field is made after the connection was set up. This is to stay in conformance with how the Inventor Mentor specifies field connections should be imported (peep page 270). πŸ“–

void SoField::writeConnection (SoOutput * out) const [protected], [virtual]

Write out information about this field's connection. ✍️


SbBool SoField::isDestructing (void ) const [protected]

You can use this to check if a field is currently being destructed. πŸ’€


πŸŽ€ AUTHOR πŸŽ€

Generated automatically by Doxygen for Coin from the source code. (yes bestie, the robots wrote the docs, we just gave them the ✨lewk✨)


and that's a wrap on SoField(3) from Coin, Version 3.1.3 πŸ’– you made it to the end, I'm so proud of you, go touch some grass and then come back and read it again. slay πŸ¦‹βœ¨πŸ‘‘

πŸ“¦ where this page comes from