SoEngine(3)

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

SoEngine(3) Library Functions Manual 🫢✨

okay bestie, this is SoEngine(3) from the Library Functions Manual, and she is the base class for Coin engines. no cap. πŸ’…


✨ NAME ✨

SoEngine β€” SoEngine is the base class for Coin engines. (literally the mother of all engines, periodt.) πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Inventor/engines/SoEngine.h>

Inherits SoFieldContainer. (she got the field-container genes, iconic.)

Inherited by:

SoBoolOperation, SoCalculator, SoComposeMatrix,
SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f,
SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate,
SoCounter, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f,
SoDecomposeVec3f, SoDecomposeVec4f, SoElapsedTime, SoFieldConverter,
SoGate, SoInterpolate, SoOnOff, SoOneShot, , SoSelectOne,
SoTexture2Convert, SoTimeCounter, and SoTransformVec3f.

(Yes, there is a lil empty spot in that list. We keep it exactly as she came. πŸ’€)

🌸 Public Member Functions 🌸

void evaluateWrapper (void)
virtual int getOutputs (SoEngineOutputList &l) const
SoEngineOutput * getOutput (const SbName &outputname) const
SbBool getOutputName (const SoEngineOutput *output, SbName &outputname) const
virtual const SoEngineOutputData * getOutputData (void) const =0
SbBool isNotifying (void) const
virtual void notify (SoNotList *nl)
SoEngine * copy (void) const
virtual SoFieldContainer * copyThroughConnection (void) const
SbBool shouldCopy (void) const
virtual void writeInstance (SoOutput *out)

πŸ’œ Public Member Functions inherited from SoFieldContainer πŸ’œ

void setToDefaults (void)
SbBool hasDefaultValues (void) const
SbBool fieldsAreEqual (const SoFieldContainer *container) const
void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=FALSE)
SbBool set (const char *const fielddata)
void get (SbString &fielddata)
virtual int getFields (SoFieldList &l) const
virtual int getAllFields (SoFieldList &l) const
virtual SoField * getField (const SbName &name) const
virtual SoField * getEventIn (const SbName &name) const
virtual SoField * getEventOut (const SbName &name) const
SbBool getFieldName (const SoField *const field, SbName &name) const
SbBool enableNotify (const SbBool flag)
SbBool isNotifyEnabled (void) const
SbBool set (const char *fielddata, SoInput *input)
void get (SbString &fielddata, SoOutput *out)
virtual SbBool validateNewFieldValue (SoField *field, void *newval)
virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)
SbBool getIsBuiltIn (void) const
virtual const SoFieldData * getFieldData (void) const
virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)
virtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged) const
void setUserData (void *userdata) const
void * getUserData (void) const

🌈 Public Member Functions inherited from SoBase 🌈

void ref (void) const
void unref (void) const
void unrefNoDelete (void) const
int32_t getRefCount (void) const
void touch (void)
virtual SoType getTypeId (void) const =0
SbBool isOfType (SoType type) const
virtual SbName getName (void) const
virtual void setName (const SbName &newname)
virtual void startNotify (void)
void addAuditor (void *const auditor, const SoNotRec::Type type)
void removeAuditor (void *const auditor, const SoNotRec::Type type)
const SoAuditorList & getAuditors (void) const
SbBool shouldWrite (void)
void assertAlive (void) const

⭐ Static Public Member Functions ⭐

static void initClass (void)
static void initClasses (void)
static SoType getClassTypeId (void)
static SoEngine * getByName (const SbName &name)
static int getByName (const SbName &name, SoEngineList &el)

✨ Static Public Member Functions inherited from SoFieldContainer ✨

static void initClass (void)
static SoType getClassTypeId (void)
static void cleanupClass (void)
static void initCopyDict (void)
static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)
static SoFieldContainer * checkCopy (const SoFieldContainer *orig)
static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)
static void copyDone (void)

πŸŽ€ Static Public Member Functions inherited from SoBase πŸŽ€

static void initClass (void)
static SoType getClassTypeId (void)
static void addName (SoBase *const base, const char *const name)
static void removeName (SoBase *const base, const char *const name)
static void incrementCurrentWriteCounter (void)
static void decrementCurrentWriteCounter (void)
static SoBase * getNamedBase (const SbName &name, SoType type)
static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)
static SbBool read (SoInput *input, SoBase *&base, SoType expectedtype)
static void setInstancePrefix (const SbString &c)
static void setTraceRefs (SbBool trace)
static SbBool getTraceRefs (void)
static SbBool connectRoute (SoInput *input, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)
static SbBool readRoute (SoInput *input)

πŸ’– Protected Member Functions πŸ’–

SoEngine (void)
virtual ~SoEngine (void)
virtual void evaluate (void)=0
virtual SbBool readInstance (SoInput *in, unsigned short flags)
virtual void inputChanged (SoField *which)
void writeOutputTypes (SoOutput *out)

🌸 Protected Member Functions inherited from SoFieldContainer 🌸

SoFieldContainer (void)
virtual ~SoFieldContainer ()

πŸ¦‹ Protected Member Functions inherited from SoBase πŸ¦‹

SoBase (void)
virtual ~SoBase ()
SbBool hasMultipleWriteRefs (void) const
SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) const
void writeFooter (SoOutput *out) const
virtual const char * getFileFormatName (void) const

πŸ’œ Static Protected Member Functions πŸ’œ

static const SoFieldData ** getInputDataPtr (void)
static const SoEngineOutputData ** getOutputDataPtr (void)

✨ Static Protected Member Functions inherited from SoBase ✨

static uint32_t getCurrentWriteCounter (void)
static void staticDataLock (void)
static void staticDataUnlock (void)

🌈 Additional Inherited Members 🌈

πŸŽ€ Protected Types inherited from SoBase πŸŽ€

enum BaseFlags { IS_ENGINE = 0x01, IS_GROUP = 0x02 }

πŸ’– Protected Attributes inherited from SoFieldContainer πŸ’–

SbBool isBuiltIn

πŸ‘‘ Detailed Description πŸ‘‘

SoEngine is the base class for Coin engines. that's the whole vibe. πŸ’…

Engines enables the application programmers to make complex connections between fields. it's giving "wiring things together but make it fashion." πŸ”₯

The most common cases where you use engines are:

  1. to constrain the values of a field with regard to the contents of one or more other fields in the scene graph
  2. as a convenient way to animate parts of the scene graph

(so: keep a field in check based on other fields, or animate bits of the scene graph. both lowkey iconic. ✨)

The reference count of an engine will be increased by 1 for each connection made to one of its engine outputs, and decreased by one for a disconnect. See SoEngineOutput::addConnection() and SoEngineOutput::removeConnection(). When the reference count goes down to zero, the engine will automatically be destroyed, and subsequent attempts at using the engine will lead to a crash.

⚠️ bestie, this is the part where we pay attention: ref count hits zero β†’ engine auto-destructs β†’ trying to use it after that = crash. no cap. do not be out here touching a dead engine. πŸ’€

If you want complete control over when an engine gets destructed, use SoBase::ref() and SoBase::unref() for explicit referencing/dereferencing.


πŸ› οΈ Constructor & Destructor Documentation πŸ› οΈ

🌸 SoEngine::SoEngine (void ) [protected] 🌸

Default constructor.

(protected, so this is for the engine girlies only. iykyk. 🫢)

πŸ’€ SoEngine::~SoEngine (void ) [protected], [virtual] πŸ’€

Destructor.

(virtual and protected, and she's taking everything with her when the ref count says so. πŸ’…)

πŸ’– Member Function Documentation πŸ’–

okay bestie, this is the big one β€” every single member function of SoEngine. buckle up πŸŽ€


void SoEngine::initClasses(void) [static]

Initializes all engines. Automatically called from SoEngine::initClass() upon initialization of Coin, so like... you don't have to lift a finger, she's already on it πŸ’…

void SoEngine::evaluateWrapper(void)

Triggers an engine evaluation. that's it, that's the whole vibe ✨

int SoEngine::getOutputs(SoEngineOutputList & l) const [virtual]

Adds all outputs to the list l. Returns the number of outputs added to the list. slay πŸ“‹

SoEngineOutput * SoEngine::getOutput(const SbName & outputname) const

Returns the output with name outputname, or NULL if no such output exists. no output, no problem πŸ™ˆ

SbBool SoEngine::getOutputName(const SoEngineOutput * output, SbName & outputname) const

Sets outputname to the name of output. Returns FALSE if no such output is contained within the engine instance. so if it's not in there, you get a lil FALSE bestie πŸ’€

virtual const SoEngineOutputData * SoEngine::getOutputData(void) const [pure virtual]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Implemented in SoBoolOperation, SoCalculator, SoComposeMatrix, SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f, SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate, SoCounter, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f, SoDecomposeVec3f, SoDecomposeVec4f, SoElapsedTime, SoFieldConverter, SoGate, SoHeightMapToNormalMap, SoInterpolate, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f, SoOneShot, SoOnOff, SoSelectOne, SoTexture2Convert, SoTimeCounter, SoTransformVec3f, and SoTriggerAny. that's a whole squad fr fr πŸ‘‘

SoEngine * SoEngine::getByName(const SbName & name) [static]

Returns the engine named name, or NULL if no such engine exists. If several engines have been registered under the same name, returns the last one which was registered. last one standing, periodt πŸ’…

int SoEngine::getByName(const SbName & name, SoEngineList & el) [static]

Finds all engines named name. Returns the number of engines added to the el list. collect them all 🌸

SbBool SoEngine::isNotifying(void) const

Returns whether we're in a notification process. This is needed to avoid double notification when an engine enables outputs during inputChanged(). she's just checking if the notif wave is already happening πŸŒ€

void SoEngine::notify(SoNotList * l) [virtual]

Notifies all auditors for this instance when changes are made.

Reimplemented from SoFieldContainer. go tell the whole group chat πŸ“£

SoEngine * SoEngine::copy(void) const

Makes a duplicate of this engine and returns a pointer to the duplicate.

Connections are shallow copied, ie the node or engine instance at the other end of the connection is not cloned. We just let the connection reference from the cloned engine refer to the same instance as the engine we've cloned ourselves from.

Note that this is not the function the application programmer should override if she needs some special behavior during a copy operation (like copying the value of internal data not exposed as fields). For that purpose, override the copyContents() method. Your overridden copyContents() method should then both copy internal data aswell as calling the parent superclass' copyContents() method for automatically handling of fields and other common data.

copy-paste energy, but make it shallow πŸͺž

SoFieldContainer * SoEngine::copyThroughConnection(void) const [virtual]

Return copy of this instance.

Note: default implementation just returns this pointer, SoNode and SoEngine override this method to return the pointer to the actual copy.

Reimplemented from SoFieldContainer.

SbBool SoEngine::shouldCopy(void) const

Returns whether this engine should be copied or simply referenced in a copy operation.

Engines which are not really part of the scenegraph should not be copied. if she's not part of the scene, she's not coming along πŸ’…

void SoEngine::writeInstance(SoOutput * out) [virtual]

Writes all the fields contained in this instance to the output stream within out.

This method is solely called from the write methods of fields.

Either from SoField if the write is done because of a field-to-field connection, or from one of the fields which may actually write SoFieldContainer instances, i.e. SoSFNode, SoMFNode, SoSFEngine, SoMFEngine, SoSFPath and SoMFPath.

This method, in addition to the ordinary write() method of SoNode, needs to be present since the fields don't have a write action instance in their writeValue() method, and writeInstance() will create a new SoWriteAction and call continueToApply() on it.

Reimplemented from SoFieldContainer.

Reimplemented in SoElapsedTime, and SoTimeCounter. ✍️

virtual void SoEngine::evaluate(void) [protected], [pure virtual]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Implemented in SoHeightMapToNormalMap.

SbBool SoEngine::readInstance(SoInput * in, unsigned short flags) [protected], [virtual]

This method is mainly intended for internal use during file import operations.

It reads a definition of an instance from the input stream in. The input stream state points to the start of a serialized / persistant representation of an instance of this class type.

TRUE or FALSE is returned, depending on if the instantiation and configuration of the new object of this class type went ok or not. The import process should be robust and handle corrupted input streams by returning FALSE.

flags is used internally during binary import when reading user extension nodes, group nodes or engines.

Reimplemented from SoFieldContainer. πŸ“₯

void SoEngine::inputChanged(SoField * which) [protected], [virtual]

Called when an input is changed. The default method does nothing, but subclasses may override this method to do The Right Thing when a specific field is changed.

Reimplemented in SoCalculator, SoGate, SoHeightMapToNormalMap, and SoTimeCounter. she noticed πŸ‘€

const SoFieldData ** SoEngine::getInputDataPtr(void) [static], [protected]

Returns the SoFieldData class which holds information about inputs in this engine.

const SoEngineOutputData ** SoEngine::getOutputDataPtr(void) [static], [protected]

Returns the SoEngineOutputData class which holds information about the outputs in this engine.

void SoEngine::writeOutputTypes(SoOutput * out) [protected]

Writes the types of engine outputs for extension engines (i.e. engines not built in to Coin). extension girlies rise ✨


πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for Coin from the source code.


and that's a wrap on the SoEngine(3) page, bestie 🫢 straight from the Coin source, version 3.1.3 β€” mwah πŸ’‹

πŸ“¦ where this page comes from