SoEngine(3)
okay bestie, sit down, hydrate, because we're doing SoEngine(3) from the Library Functions Manual and it's a whole journey πβ¨
πΈ NAME πΈ
SoEngine β bestie, this is the base class for Coin engines. That's it, that's the name. Iconic.
π¦ SYNOPSIS π¦
#include <Inventor/engines/SoEngine.h>
Inherits SoFieldContainer. π
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, SoTimeCounter, SoTransformVec3f, and SoTriggerAny. literally the whole squad π«Ά
β¨ Public Member Functions β¨
void evaluateWrapper (void)virtual int getOutputs (SoEngineOutputList &l) constSoEngineOutput * getOutput (const SbName &outputname) constSbBool getOutputName (const SoEngineOutput *output, SbName &outputname) constvirtual const SoEngineOutputData * getOutputData (void) const =0SbBool isNotifying (void) constvirtual void notify (SoNotList *nl)SoEngine * copy (void) constvirtual SoFieldContainer * copyThroughConnection (void) constSbBool shouldCopy (void) constvirtual void writeInstance (SoOutput *out)
π Public Member Functions inherited from SoFieldContainer π
void setToDefaults (void)SbBool hasDefaultValues (void) constSbBool fieldsAreEqual (const SoFieldContainer *container) constvoid copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=0)SbBool set (const char *const fielddata)void get (SbString &fielddata)virtual int getFields (SoFieldList &l) constvirtual int getAllFields (SoFieldList &l) constvirtual SoField * getField (const SbName &name) constvirtual SoField * getEventIn (const SbName &name) constvirtual SoField * getEventOut (const SbName &name) constSbBool getFieldName (const SoField *const field, SbName &name) constSbBool enableNotify (const SbBool flag)SbBool isNotifyEnabled (void) constSbBool set (const char *fielddata, SoInput *in)void get (SbString &fielddata, SoOutput *out)virtual SbBool validateNewFieldValue (SoField *field, void *newval)virtual void addWriteReference (SoOutput *out, SbBool isfromfield=0)SbBool getIsBuiltIn (void) constvirtual const SoFieldData * getFieldData (void) constvirtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)void setUserData (void *userdata) constvoid * getUserData (void) const
π Public Member Functions inherited from SoBase π
void ref (void) constvoid unref (void) constvoid unrefNoDelete (void) constint32_t getRefCount (void) constvoid touch (void)virtual SoType getTypeId (void) const =0SbBool isOfType (SoType type) constvirtual SbName getName (void) constvirtual 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) constSbBool 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 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 *in, SoBase *&base, SoType expectedtype)static void setInstancePrefix (const SbString &c)static void setTraceRefs (SbBool trace)static SbBool getTraceRefs (void)static SbBool connectRoute (SoInput *in, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)static SbBool readRoute (SoInput *in)
π§ Protected Member Functions π§
SoEngine (void)virtual ~SoEngine ()virtual void evaluate (void)=0virtual SbBool readInstance (SoInput *in, unsigned short flags)virtual void inputChanged (SoField *which)void writeOutputTypes (SoOutput *out)
π Protected Member Functions inherited from SoFieldContainer π
SoFieldContainer (void)~SoFieldContainer ()
π Protected Member Functions inherited from SoBase π
SoBase (void)virtual ~SoBase ()SbBool hasMultipleWriteRefs (void) constSbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constvoid writeFooter (SoOutput *out) constvirtual 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)
π Friends π
class SoEngineOutput
π¦ 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. periodt.
Bestie, engines let the application programmers make complex connections between fields. That's the whole vibe. β¨
The most common cases where you use engines are:
- to constrain the values of a field with regard to the contents of one or more other fields in the scene graph
- as a convenient way to animate parts of the scene graph
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. π not the crash, bestie, we do NOT want that.
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. π
Referenced by copy(), copyThroughConnection(), getByName(), and getOutputData().
π SoEngine::~SoEngine () [protected], [virtual] π
Destructor. π
References SoDebugError::postInfo().
bestie this page is a two-parter, so don't go anywhere β part 2 is coming and it's gonna eat π½οΈβ¨
π Member Function Documentation π
okay bestie, deep breath, this is the big one β every single member function of SoEngine, one by one, no skips. grab a snack, we're doing this. π
π void SoEngine::initClasses (void ) [static]
Wakes up all the engines and gets them ready to go. This one gets called automatically from SoEngine::initClass() when Coin itself is initializing β so like, you never have to poke it yourself. β¨
- References:
SoBase::initClass().
π¦ void SoEngine::evaluateWrapper (void )
Kicks off an engine evaluation. Like, "go, girl, do your thing." π
- References:
evaluate(), andgetOutputData(). - Referenced by:
SoField::evaluateConnection().
πΈ int SoEngine::getOutputs (SoEngineOutputList & l) const [virtual]
Drops all the outputs into the list l, and tells you how many it just added. Count 'em, bestie. π’
- References:
getOutputData(). - Referenced by:
SoFieldConverter::getForwardConnections().
β¨ SoEngineOutput * SoEngine::getOutput (const SbName & outputname) const
Hands you back the output named outputname β or NULL if that output just... doesn't exist. no output, no problem, no cap. π
- References:
getOutputData(). - Referenced by:
SoField::copyConnection().
π«Ά SbBool SoEngine::getOutputName (const SoEngineOutput * output, SbName & outputname) const
Sets outputname to the name of output. If this engine instance doesn't contain that output at all, you get FALSE back. π
- References:
getOutputData(). - Referenced by:
SoField::copyConnection().
π virtual const SoEngineOutputData * SoEngine::getOutputData (void ) const [pure virtual]
So this API member is considered internal to the library β it's giving "not for the application programmer, bestie, mind your business" energy. You probably don't need it. π
Implemented in: SoBoolOperation, SoCalculator, SoComposeMatrix, SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f, SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate, SoCounter, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f, SoDecomposeVec3f, SoDecomposeVec4f, SoElapsedTime, SoFieldConverter, SoGate, SoInterpolate, SoInterpolateFloat, SoInterpolateRotation, SoInterpolateVec2f, SoInterpolateVec3f, SoInterpolateVec4f, SoOneShot, SoOnOff, SoSelectOne, SoTimeCounter, SoTransformVec3f, and SoTriggerAny.
- References:
copy(),getByName(),isNotifying(),shouldCopy(),SoEngine(), andSoFieldContainer::SoFieldContainer(). - Referenced by:
evaluateWrapper(),SoEngineOutput::getConnectionType(),getOutput(),getOutputName(),getOutputs(), andnotify().
π SoEngine * SoEngine::getByName (const SbName & name) [static]
Returns the engine named name, or NULL if no such engine exists. And listen β if several engines got registered under the same name, you get the last one that was registered. last one wins, periodt. π
- References:
SoBase::getNamedBase(), andSoEngine(). - Referenced by:
getOutputData().
π int SoEngine::getByName (const SbName & name, SoEngineList & el) [static]
Finds all the engines named name and returns how many got added to the el list. collector era. π
- References:
SoBase::getNamedBases().
π SbBool SoEngine::isNotifying (void ) const
Tells you whether we're currently in a notification process. Why do we care? To avoid double notification when an engine enables outputs during inputChanged(). not the double-text situation, bestie. π
- Referenced by:
getOutputData(), andnotify().
π₯ void SoEngine::notify (SoNotList * l) [virtual]
Notifies all the auditors for this instance when changes are made. like a group chat announcement, but for changes. π£
- Reimplemented from:
SoFieldContainer. - References:
SoNotList::append(),SoNotList::getLastField(),SoNotList::getLastRec(),SoBase::getName(),getOutputData(),SoNotRec::getType(),SoBase::getTypeId(),inputChanged(),SoFieldContainer::isNotifyEnabled(),isNotifying(),SoDebugError::postInfo(), andSoNotRec::setType().
π§ SoEngine * SoEngine::copy (void ) const
Makes a duplicate of this engine and returns a pointer to the duplicate. π«Ά
Connections are shallow copied β meaning 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 point at the same instance as the engine we cloned ourselves from. same bestie, different body, iykyk. π
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 thecopyContents()method. Your overriddencopyContents()method should then both copy internal data aswell as calling the parent superclass'copyContents()method for automatically handling of fields and other common data.
- References:
SoFieldContainer::addCopy(),SoFieldContainer::checkCopy(),SoFieldContainer::copyDone(),SoType::createInstance(),SoFieldContainer::findCopy(),SoBase::getTypeId(),SoFieldContainer::initCopyDict(),SoBase::ref(),SoEngine(), andSoBase::unrefNoDelete(). - Referenced by:
SoMFEngine::fixCopy(),SoSFEngine::fixCopy(), andgetOutputData().
π SoFieldContainer * SoEngine::copyThroughConnection (void ) const [virtual]
Returns a copy of this instance. π
Note: the default implementation just returns this pointer;SoNodeandSoEngineoverride this method to return the pointer to the actual copy.
- Reimplemented from:
SoFieldContainer. - References:
SoFieldContainer::checkCopy(),SoFieldContainer::findCopy(),shouldCopy(),SoEngine(), andSoFieldContainer::SoFieldContainer(). - Referenced by:
SoField::copyConnection().
β SbBool SoEngine::shouldCopy (void ) const
Tells you whether this engine should actually be copied, or just referenced, during a copy operation.
Engines that aren't really part of the scenegraph? They should not be copied. stay in your lane, queen. π
- References:
SoFieldContainer::getFields(),SoBase::getName(),SoBase::getTypeId(), andSoDebugError::postInfo(). - Referenced by:
copyThroughConnection(), andgetOutputData().
πΈ 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, andSoTimeCounter. - References:
SoBase::writeFooter(),SoBase::writeHeader(), andSoFieldContainer::writeInstance(). - Referenced by:
SoElapsedTime::writeInstance(), andSoTimeCounter::writeInstance().
π virtual void SoEngine::evaluate (void ) [protected], [pure virtual]
Another one of those internal to the library API members β not likely to be of interest to the application programmer, bestie. it's giving "you weren't supposed to see this." π
- References:
getInputDataPtr(),getOutputDataPtr(),inputChanged(), andwriteOutputTypes(). - Referenced by:
evaluateWrapper().
π¦ 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. - References:
SoFieldContainer::readInstance().
π 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 The Right Thing when a specific field is changed. π
- Reimplemented in:
SoCalculator,SoGate, andSoTimeCounter. - Referenced by:
evaluate(), andnotify().
β¨ const SoFieldData ** SoEngine::getInputDataPtr (void ) [static], [protected]
Returns the SoFieldData class which holds information about inputs in this engine.
- Referenced by:
evaluate().
π const SoEngineOutputData ** SoEngine::getOutputDataPtr (void ) [static], [protected]
Returns the SoEngineOutputData class which holds information about the outputs in this engine.
- Referenced by:
evaluate().
π«Ά void SoEngine::writeOutputTypes (SoOutput * out) [protected]
Writes the types of engine outputs for extension engines (i.e. engines not built in to Coin). π οΈ
- Referenced by:
evaluate().
π Author π
Generated automatically by Doxygen for Coin from the source code. (yes bestie, the docs wrote themselves, we just made them cute.)
and that's a wrap on SoEngine(3)! this page came from the Coin manual, Version 2.5.0, dated to match SoEngine(3) β ty for reading all the way through, you ate that. πβ¨π
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms