SoEngine(3)
π NAME π
okay so this is the manual page for SoEngine(3) from the Coin crew. SoEngine β it's the base class for Coin engines. That's the whole vibe, bestie. π
β¨ 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, SoProfilerTopEngine, SoSelectOne, SoTexture2Convert, SoTimeCounter, SoTransformVec3f, and SoTriggerAny. π¦
π«Ά Public Member Functions π«Ά
void evaluateWrapper (void)β the wrapper evaluate, she evaluates. πvirtual int getOutputs (SoEngineOutputList &l) constβ get those outputs.SoEngineOutput * getOutput (const SbName &outputname) constβ grab an output by name.SbBool getOutputName (const SoEngineOutput *output, SbName &outputname) constβ get the name of an output.virtual const SoEngineOutputData * getOutputData (void) const =0β pure virtual output data getter.SbBool isNotifying (void) constβ is it notifying? asking for a friend.virtual void notify (SoNotList *nl)β notify the list.SoEngine * copy (void) constβ copy it.virtual SoFieldContainer * copyThroughConnection (void) constβ copy through the connection.SbBool shouldCopy (void) constβ should it copy? π€virtual void writeInstance (SoOutput *out)β write the instance out.
π
Public Member Functions inherited from SoFieldContainer π
void setToDefaults (void)β reset to defaults.SbBool hasDefaultValues (void) constβ does it have default values?SbBool fieldsAreEqual (const SoFieldContainer *container) constβ compare fields.void copyFieldValues (const SoFieldContainer *container, SbBool copyconnections=FALSE)β copy field values, withcopyconnections=FALSEdefault.SbBool set (const char *const fielddata)β set from field data.void get (SbString &fielddata)β get field data.virtual int getFields (SoFieldList &l) constβ get the fields.virtual int getAllFields (SoFieldList &l) constβ get all the fields.virtual SoField * getField (const SbName &name) constβ get a field by name.virtual SoField * getEventIn (const SbName &name) constβ get an event in.virtual SoField * getEventOut (const SbName &name) constβ get an event out.SbBool getFieldName (const SoField *const field, SbName &name) constβ get the field name.SbBool enableNotify (const SbBool flag)β toggle notify.SbBool isNotifyEnabled (void) constβ is notify enabled?SbBool set (const char *fielddata, SoInput *input)β set from field data with input.void get (SbString &fielddata, SoOutput *out)β get field data with output.virtual SbBool validateNewFieldValue (SoField *field, void *newval)β validate a new field value.virtual void addWriteReference (SoOutput *out, SbBool isfromfield=FALSE)β add a write reference,isfromfield=FALSEdefault.SbBool getIsBuiltIn (void) constβ is it built in?virtual const SoFieldData * getFieldData (void) constβ get the field data.virtual void copyContents (const SoFieldContainer *from, SbBool copyconnections)β copy contents.virtual void getFieldsMemorySize (size_t &managed, size_t &unmanaged) constβ get fields memory size.void setUserData (void *userdata) constβ set user data.void * getUserData (void) constβ get user data.
π Public Member Functions inherited from SoBase π
void ref (void) constβ ref it.void unref (void) constβ unref it.void unrefNoDelete (void) constβ unref without delete.int32_t getRefCount (void) constβ get the ref count.void touch (void)β touch it.virtual SoType getTypeId (void) const =0β Returns the type identification of an object derived from a class inheritingSoBase. This is used for runtime type checking anddownward"casting.SbBool isOfType (SoType type) constβ ReturnsTRUEif the type of this object is either of the same type or inherited from type.virtual SbName getName (void) constβ get the name.virtual void setName (const SbName &newname)β set the name.virtual void startNotify (void)β start notify.void addAuditor (void *const auditor, const SoNotRec::Type type)β add an auditor.void removeAuditor (void *const auditor, const SoNotRec::Type type)β remove an auditor.const SoAuditorList & getAuditors (void) constβ get the auditors.SbBool shouldWrite (void)β should it write?void assertAlive (void) constβ assert alive.
π Static Public Member Functions π
static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.static void initClasses (void)β init all the classes.static SoType getClassTypeId (void)β This static method returns theSoTypeobject associated with objects of this class.static SoEngine * getByName (const SbName &name)β get by name.static int getByName (const SbName &name, SoEngineList &el)β get by name into anSoEngineList.
π Static Public Member Functions inherited from SoFieldContainer π
static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.static SoType getClassTypeId (void)β This static method returns theSoTypeobject associated with objects of this class.static void cleanupClass (void)β cleanup the class.static void initCopyDict (void)β init the copy dictionary.static void addCopy (const SoFieldContainer *orig, const SoFieldContainer *copy)β add a copy.static SoFieldContainer * checkCopy (const SoFieldContainer *orig)β check a copy.static SoFieldContainer * findCopy (const SoFieldContainer *orig, const SbBool copyconnections)β find a copy.static void copyDone (void)β copy done.
πΈ Static Public Member Functions inherited from SoBase πΈ
static void initClass (void)β Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.static SoType getClassTypeId (void)β This static method returns theSoTypeobject associated with objects of this class.static void addName (SoBase *const base, const char *const name)β add a name.static void removeName (SoBase *const base, const char *const name)β remove a name.static void incrementCurrentWriteCounter (void)β increment the current write counter.static void decrementCurrentWriteCounter (void)β decrement the current write counter.static SoBase * getNamedBase (const SbName &name, SoType type)β get a named base.static int getNamedBases (const SbName &name, SoBaseList &baselist, SoType type)β get named bases.static SbBool read (SoInput *input, SoBase *&base, SoType expectedtype)β read.static void setInstancePrefix (const SbString &c)β set the instance prefix.static void setTraceRefs (SbBool trace)β set trace refs.static SbBool getTraceRefs (void)β get trace refs.static SbBool connectRoute (SoInput *input, const SbName &fromnodename, const SbName &fromfieldname, const SbName &tonodename, const SbName &tofieldname)β connect a route.static SbBool readRoute (SoInput *input)β read a route.
π Protected Member Functions π
SoEngine (void)β constructor, protected.virtual ~SoEngine (void)β destructor, protected and virtual.virtual void evaluate (void)=0β pure virtual evaluate. periodt.virtual SbBool readInstance (SoInput *in, unsigned short flags)β read an instance.virtual void inputChanged (SoField *which)β input changed.void writeOutputTypes (SoOutput *out)β write output types.
π§ Protected Member Functions inherited from SoFieldContainer π§
SoFieldContainer (void)β constructor.virtual ~SoFieldContainer ()β destructor.
π Protected Member Functions inherited from SoBase π
SoBase (void)β constructor.virtual ~SoBase ()β destructor.SbBool hasMultipleWriteRefs (void) constβ has multiple write refs?SbBool writeHeader (SoOutput *out, SbBool isgroup, SbBool isengine) constβ write header.void writeFooter (SoOutput *out) constβ write footer.virtual const char * getFileFormatName (void) constβ get the file format name.virtual SoNotRec createNotRec (void)β create a notification record.
β Static Protected Member Functions β
static const SoFieldData ** getInputDataPtr (void)β get input data pointer.static const SoEngineOutputData ** getOutputDataPtr (void)β get output data pointer.
π¦ Static Protected Member Functions inherited from SoBase π¦
static uint32_t getCurrentWriteCounter (void)β get current write counter.static void staticDataLock (void)β lock static data.static void staticDataUnlock (void)β unlock static data.
π«§ 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. No cap.
Engines enable the application programmers to make complex connections between fields. β¨
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. π so be careful, bestie.
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. π«Ά
SoEngine::~SoEngine (void ) [protected], [virtual]
Destructor. π
β¨ Member Function Documentation β¨
okay so this is the big one, bestie β every single member function, no skipping, we're eating the whole plate π
void SoEngine::initClasses (void ) [static]
Wakes up all the engines. Lowkey a group alarm clock. It gets called automatically from SoEngine::initClass() whenever Coin itself gets initialized, so you don't have to poke it yourself. π«Ά
void SoEngine::evaluateWrapper (void )
Triggers an engine evaluation. That's it, that's the whole vibe. β¨
int SoEngine::getOutputs (SoEngineOutputList & l) const [virtual]
Drops every single output into the list l, and hands you back the number of outputs it added. So the return value is literally "how many did I just give you". π
SoEngineOutput * SoEngine::getOutput (const SbName & outputname) const
Gives you back the output whose name is outputname. And if there's no output with that name? You get NULL. No output, no problem, just NULL. π
SbBool SoEngine::getOutputName (const SoEngineOutput * output, SbName & outputname) const
Sets outputname to the name of output. If that output isn't contained inside this engine instance, you get FALSE back. So FALSE = "not mine, 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.
So like, it's giving backstage pass only π₯ β internal business, not really your problem unless you're deep in the Coin guts.
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, SoProfilerTopEngine, SoSelectOne, SoTexture2Convert, SoTimeCounter, SoTransformVec3f, and SoTriggerAny. That's a whole roster, honestly π
SoEngine * SoEngine::getByName (const SbName & name) [static]
Gives you the engine named name. No engine with that name? NULL, sorry bestie π. And here's the tea: if multiple engines got registered under the same name, you get the last one that was registered. Last one wins, periodt.
int SoEngine::getByName (const SbName & name, SoEngineList & el) [static]
Finds all engines named name (yes, plural, this is the collect-them-all version π) and returns the number of engines it added to the el list.
SbBool SoEngine::isNotifying (void ) const
Tells you whether we're currently in a notification process. Why do we care? Because it's needed to dodge a double notification when an engine enables outputs during inputChanged(). No double-notif on my watch π
void SoEngine::notify (SoNotList * l) [virtual]
Pings all the auditors for this instance whenever changes happen. It's the group chat announcement of the engine world. π£
Reimplemented from SoFieldContainer.
SoEngine * SoEngine::copy (void ) const
Makes a duplicate of this engine and returns a pointer to the duplicate. Clone era. π¦
Connections are shallow copied β meaning the node or engine instance sitting at the other end of the connection is not cloned. We just let the connection reference from the cloned engine point at the exact same instance as the engine we cloned ourselves from. Same friend group, new member.
Heads up, and this matters: 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 as well as calling the parent superclass'copyContents()method for automatically handling of fields and other common data. Write that down π
SoFieldContainer * SoEngine::copyThroughConnection (void ) const [virtual]
Returns a copy of this instance.
Note: the default implementation just returnsthispointer, andSoNodeandSoEngineoverride 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 scene graph should not be copied. If it's not in the scene graph, it doesn't get a clone. Simple as that π
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.
And the reason this method has to exist, in addition to the ordinary write() method of SoNode, is that the fields don't have a write action instance in their writeValue() method β so writeInstance() will create a new SoWriteAction and call continueToApply() on it. Iconic little workaround, honestly π₯
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.
Backstage again π internal to the library, not really your business.
Implemented in SoHeightMapToNormalMap, and SoProfilerTopEngine.
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 / persistent representation of an instance of this class type.
You get TRUE or FALSE back, 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. Like, don't panic, just return 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. Capital-T, capital-R, The Right Thing β¨
Reimplemented in SoCalculator, SoGate, SoHeightMapToNormalMap, and SoTimeCounter.
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. The outputs' info, specifically. π€
void SoEngine::writeOutputTypes (SoOutput * out) [protected]
Writes the types of engine outputs for extension engines (i.e. engines not built in to Coin). For the custom ones, the special ones, the ones you made yourself π§
π Author
Generated automatically by Doxygen for Coin from the source code.
and that's a wrap on SoEngine(3), bestie π this page is from Coin version 4.0.10, dated Thu Jun 25 2026 00:00:00, and honestly? it ate. go forth and evaluate your engines responsibly πβ¨π
π¦ 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