.TH "SoEngine" 3 "Tue Jun 23 2026 23:48:38" "Version 4.0.10" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoEngine \- \fBSoEngine\fP is the base class for Coin engines\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherits \fBSoFieldContainer\fP\&. .PP Inherited by \fBSoBoolOperation\fP, \fBSoCalculator\fP, \fBSoComposeMatrix\fP, \fBSoComposeRotation\fP, \fBSoComposeRotationFromTo\fP, \fBSoComposeVec2f\fP, \fBSoComposeVec3f\fP, \fBSoComposeVec4f\fP, \fBSoComputeBoundingBox\fP, \fBSoConcatenate\fP, \fBSoCounter\fP, \fBSoDecomposeMatrix\fP, \fBSoDecomposeRotation\fP, \fBSoDecomposeVec2f\fP, \fBSoDecomposeVec3f\fP, \fBSoDecomposeVec4f\fP, \fBSoElapsedTime\fP, \fBSoFieldConverter\fP, \fBSoGate\fP, \fBSoInterpolate\fP, \fBSoOnOff\fP, \fBSoOneShot\fP, \fBSoProfilerTopEngine\fP, \fBSoSelectOne\fP, \fBSoTexture2Convert\fP, \fBSoTimeCounter\fP, \fBSoTransformVec3f\fP, and \fBSoTriggerAny\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "void \fBevaluateWrapper\fP (void)" .br .ti -1c .RI "virtual int \fBgetOutputs\fP (\fBSoEngineOutputList\fP &l) const" .br .ti -1c .RI "\fBSoEngineOutput\fP * \fBgetOutput\fP (const \fBSbName\fP &outputname) const" .br .ti -1c .RI "SbBool \fBgetOutputName\fP (const \fBSoEngineOutput\fP *output, \fBSbName\fP &outputname) const" .br .ti -1c .RI "virtual const \fBSoEngineOutputData\fP * \fBgetOutputData\fP (void) const =0" .br .ti -1c .RI "SbBool \fBisNotifying\fP (void) const" .br .ti -1c .RI "virtual void \fBnotify\fP (\fBSoNotList\fP *nl)" .br .ti -1c .RI "\fBSoEngine\fP * \fBcopy\fP (void) const" .br .ti -1c .RI "virtual \fBSoFieldContainer\fP * \fBcopyThroughConnection\fP (void) const" .br .ti -1c .RI "SbBool \fBshouldCopy\fP (void) const" .br .ti -1c .RI "virtual void \fBwriteInstance\fP (\fBSoOutput\fP *out)" .br .in -1c Public Member Functions inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "void \fBsetToDefaults\fP (void)" .br .ti -1c .RI "SbBool \fBhasDefaultValues\fP (void) const" .br .ti -1c .RI "SbBool \fBfieldsAreEqual\fP (const \fBSoFieldContainer\fP *container) const" .br .ti -1c .RI "void \fBcopyFieldValues\fP (const \fBSoFieldContainer\fP *container, SbBool copyconnections=FALSE)" .br .ti -1c .RI "SbBool \fBset\fP (const char *const fielddata)" .br .ti -1c .RI "void \fBget\fP (\fBSbString\fP &fielddata)" .br .ti -1c .RI "virtual int \fBgetFields\fP (\fBSoFieldList\fP &l) const" .br .ti -1c .RI "virtual int \fBgetAllFields\fP (\fBSoFieldList\fP &l) const" .br .ti -1c .RI "virtual \fBSoField\fP * \fBgetField\fP (const \fBSbName\fP &name) const" .br .ti -1c .RI "virtual \fBSoField\fP * \fBgetEventIn\fP (const \fBSbName\fP &name) const" .br .ti -1c .RI "virtual \fBSoField\fP * \fBgetEventOut\fP (const \fBSbName\fP &name) const" .br .ti -1c .RI "SbBool \fBgetFieldName\fP (const \fBSoField\fP *const field, \fBSbName\fP &name) const" .br .ti -1c .RI "SbBool \fBenableNotify\fP (const SbBool flag)" .br .ti -1c .RI "SbBool \fBisNotifyEnabled\fP (void) const" .br .ti -1c .RI "SbBool \fBset\fP (const char *fielddata, \fBSoInput\fP *input)" .br .ti -1c .RI "void \fBget\fP (\fBSbString\fP &fielddata, \fBSoOutput\fP *out)" .br .ti -1c .RI "virtual SbBool \fBvalidateNewFieldValue\fP (\fBSoField\fP *field, void *newval)" .br .ti -1c .RI "virtual void \fBaddWriteReference\fP (\fBSoOutput\fP *out, SbBool isfromfield=FALSE)" .br .ti -1c .RI "SbBool \fBgetIsBuiltIn\fP (void) const" .br .ti -1c .RI "virtual const \fBSoFieldData\fP * \fBgetFieldData\fP (void) const" .br .ti -1c .RI "virtual void \fBcopyContents\fP (const \fBSoFieldContainer\fP *from, SbBool copyconnections)" .br .ti -1c .RI "virtual void \fBgetFieldsMemorySize\fP (size_t &managed, size_t &unmanaged) const" .br .ti -1c .RI "void \fBsetUserData\fP (void *userdata) const" .br .ti -1c .RI "void * \fBgetUserData\fP (void) const" .br .in -1c Public Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "void \fBref\fP (void) const" .br .ti -1c .RI "void \fBunref\fP (void) const" .br .ti -1c .RI "void \fBunrefNoDelete\fP (void) const" .br .ti -1c .RI "int32_t \fBgetRefCount\fP (void) const" .br .ti -1c .RI "void \fBtouch\fP (void)" .br .ti -1c .RI "virtual \fBSoType\fP \fBgetTypeId\fP (void) const =0" .br .RI "Returns the type identification of an object derived from a class inheriting \fBSoBase\fP\&. This is used for runtime type checking and "downward" casting\&. " .ti -1c .RI "SbBool \fBisOfType\fP (\fBSoType\fP type) const" .br .RI "Returns \fRTRUE\fP if the type of this object is either of the same type or inherited from \fItype\fP\&. " .ti -1c .RI "virtual \fBSbName\fP \fBgetName\fP (void) const" .br .ti -1c .RI "virtual void \fBsetName\fP (const \fBSbName\fP &newname)" .br .ti -1c .RI "virtual void \fBstartNotify\fP (void)" .br .ti -1c .RI "void \fBaddAuditor\fP (void *const auditor, const \fBSoNotRec::Type\fP type)" .br .ti -1c .RI "void \fBremoveAuditor\fP (void *const auditor, const \fBSoNotRec::Type\fP type)" .br .ti -1c .RI "const \fBSoAuditorList\fP & \fBgetAuditors\fP (void) const" .br .ti -1c .RI "SbBool \fBshouldWrite\fP (void)" .br .ti -1c .RI "void \fBassertAlive\fP (void) const" .br .in -1c .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static void \fBinitClasses\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "This static method returns the \fBSoType\fP object associated with objects of this class\&. " .ti -1c .RI "static \fBSoEngine\fP * \fBgetByName\fP (const \fBSbName\fP &name)" .br .ti -1c .RI "static int \fBgetByName\fP (const \fBSbName\fP &name, \fBSoEngineList\fP &el)" .br .in -1c Static Public Member Functions inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "This static method returns the \fBSoType\fP object associated with objects of this class\&. " .ti -1c .RI "static void \fBcleanupClass\fP (void)" .br .ti -1c .RI "static void \fBinitCopyDict\fP (void)" .br .ti -1c .RI "static void \fBaddCopy\fP (const \fBSoFieldContainer\fP *orig, const \fBSoFieldContainer\fP *copy)" .br .ti -1c .RI "static \fBSoFieldContainer\fP * \fBcheckCopy\fP (const \fBSoFieldContainer\fP *orig)" .br .ti -1c .RI "static \fBSoFieldContainer\fP * \fBfindCopy\fP (const \fBSoFieldContainer\fP *orig, const SbBool copyconnections)" .br .ti -1c .RI "static void \fBcopyDone\fP (void)" .br .in -1c Static Public Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. " .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "This static method returns the \fBSoType\fP object associated with objects of this class\&. " .ti -1c .RI "static void \fBaddName\fP (\fBSoBase\fP *const base, const char *const name)" .br .ti -1c .RI "static void \fBremoveName\fP (\fBSoBase\fP *const base, const char *const name)" .br .ti -1c .RI "static void \fBincrementCurrentWriteCounter\fP (void)" .br .ti -1c .RI "static void \fBdecrementCurrentWriteCounter\fP (void)" .br .ti -1c .RI "static \fBSoBase\fP * \fBgetNamedBase\fP (const \fBSbName\fP &name, \fBSoType\fP type)" .br .ti -1c .RI "static int \fBgetNamedBases\fP (const \fBSbName\fP &name, \fBSoBaseList\fP &baselist, \fBSoType\fP type)" .br .ti -1c .RI "static SbBool \fBread\fP (\fBSoInput\fP *input, \fBSoBase\fP *&base, \fBSoType\fP expectedtype)" .br .ti -1c .RI "static void \fBsetInstancePrefix\fP (const \fBSbString\fP &c)" .br .ti -1c .RI "static void \fBsetTraceRefs\fP (SbBool trace)" .br .ti -1c .RI "static SbBool \fBgetTraceRefs\fP (void)" .br .ti -1c .RI "static SbBool \fBconnectRoute\fP (\fBSoInput\fP *input, const \fBSbName\fP &fromnodename, const \fBSbName\fP &fromfieldname, const \fBSbName\fP &tonodename, const \fBSbName\fP &tofieldname)" .br .ti -1c .RI "static SbBool \fBreadRoute\fP (\fBSoInput\fP *input)" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBSoEngine\fP (void)" .br .ti -1c .RI "virtual \fB~SoEngine\fP (void)" .br .ti -1c .RI "virtual void \fBevaluate\fP (void)=0" .br .ti -1c .RI "virtual SbBool \fBreadInstance\fP (\fBSoInput\fP *in, unsigned short flags)" .br .ti -1c .RI "virtual void \fBinputChanged\fP (\fBSoField\fP *which)" .br .ti -1c .RI "void \fBwriteOutputTypes\fP (\fBSoOutput\fP *out)" .br .in -1c Protected Member Functions inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "\fBSoFieldContainer\fP (void)" .br .ti -1c .RI "virtual \fB~SoFieldContainer\fP ()" .br .in -1c Protected Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "\fBSoBase\fP (void)" .br .ti -1c .RI "virtual \fB~SoBase\fP ()" .br .ti -1c .RI "SbBool \fBhasMultipleWriteRefs\fP (void) const" .br .ti -1c .RI "SbBool \fBwriteHeader\fP (\fBSoOutput\fP *out, SbBool isgroup, SbBool isengine) const" .br .ti -1c .RI "void \fBwriteFooter\fP (\fBSoOutput\fP *out) const" .br .ti -1c .RI "virtual const char * \fBgetFileFormatName\fP (void) const" .br .ti -1c .RI "virtual \fBSoNotRec\fP \fBcreateNotRec\fP (void)" .br .in -1c .SS "Static Protected Member Functions" .in +1c .ti -1c .RI "static const \fBSoFieldData\fP ** \fBgetInputDataPtr\fP (void)" .br .ti -1c .RI "static const \fBSoEngineOutputData\fP ** \fBgetOutputDataPtr\fP (void)" .br .in -1c Static Protected Member Functions inherited from \fBSoBase\fP .in +1c .ti -1c .RI "static uint32_t \fBgetCurrentWriteCounter\fP (void)" .br .ti -1c .RI "static void \fBstaticDataLock\fP (void)" .br .ti -1c .RI "static void \fBstaticDataUnlock\fP (void)" .br .in -1c .SS "Additional Inherited Members" Protected Types inherited from \fBSoBase\fP .in +1c .ti -1c .RI "enum \fBBaseFlags\fP { \fBIS_ENGINE\fP = 0x01, \fBIS_GROUP\fP = 0x02 }" .br .in -1c Protected Attributes inherited from \fBSoFieldContainer\fP .in +1c .ti -1c .RI "SbBool \fBisBuiltIn\fP" .br .in -1c .SH "Detailed Description" .PP \fBSoEngine\fP is the base class for Coin engines\&. Engines enable the application programmers to make complex connections between fields\&. .PP 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\&. .PP 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 \fBSoEngineOutput::addConnection()\fP and \fBSoEngineOutput::removeConnection()\fP\&. 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\&. .PP If you want complete control over when an engine gets destructed, use \fBSoBase::ref()\fP and \fBSoBase::unref()\fP for explicit referencing/dereferencing\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoEngine::SoEngine (void )\fR [protected]\fP" Default constructor\&. .SS "SoEngine::~SoEngine (void )\fR [protected]\fP, \fR [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "void SoEngine::initClasses (void )\fR [static]\fP" Initializes all engines\&. Automatically called from \fBSoEngine::initClass()\fP upon initialization of Coin\&. .SS "void SoEngine::evaluateWrapper (void )" Triggers an engine evaluation\&. .SS "int SoEngine::getOutputs (\fBSoEngineOutputList\fP & l) const\fR [virtual]\fP" Adds all outputs to list\&. Returns the number of outputs added to the list\&. .SS "\fBSoEngineOutput\fP * SoEngine::getOutput (const \fBSbName\fP & outputname) const" Returns the output with name \fIoutputname\fP, or \fRNULL\fP if no such output exists\&. .SS "SbBool SoEngine::getOutputName (const \fBSoEngineOutput\fP * output, \fBSbName\fP & outputname) const" Sets \fIoutputname\fP to the name of \fIoutput\fP\&. Returns \fRFALSE\fP if no such output is contained within the engine instance\&. .SS "virtual const \fBSoEngineOutputData\fP * SoEngine::getOutputData (void ) const\fR [pure virtual]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .PP Implemented in \fBSoBoolOperation\fP, \fBSoCalculator\fP, \fBSoComposeMatrix\fP, \fBSoComposeRotation\fP, \fBSoComposeRotationFromTo\fP, \fBSoComposeVec2f\fP, \fBSoComposeVec3f\fP, \fBSoComposeVec4f\fP, \fBSoComputeBoundingBox\fP, \fBSoConcatenate\fP, \fBSoCounter\fP, \fBSoDecomposeMatrix\fP, \fBSoDecomposeRotation\fP, \fBSoDecomposeVec2f\fP, \fBSoDecomposeVec3f\fP, \fBSoDecomposeVec4f\fP, \fBSoElapsedTime\fP, \fBSoFieldConverter\fP, \fBSoGate\fP, \fBSoHeightMapToNormalMap\fP, \fBSoInterpolate\fP, \fBSoInterpolateFloat\fP, \fBSoInterpolateRotation\fP, \fBSoInterpolateVec2f\fP, \fBSoInterpolateVec3f\fP, \fBSoInterpolateVec4f\fP, \fBSoOneShot\fP, \fBSoOnOff\fP, \fBSoProfilerTopEngine\fP, \fBSoSelectOne\fP, \fBSoTexture2Convert\fP, \fBSoTimeCounter\fP, \fBSoTransformVec3f\fP, and \fBSoTriggerAny\fP\&. .SS "\fBSoEngine\fP * SoEngine::getByName (const \fBSbName\fP & name)\fR [static]\fP" Returns the engine named \fIname\fP, or \fRNULL\fP if no such engine exists\&. If several engines have been registered under the same name, returns the \fIlast\fP one which was registered\&. .SS "int SoEngine::getByName (const \fBSbName\fP & name, \fBSoEngineList\fP & el)\fR [static]\fP" Finds all engines named \fIname\fP\&. Returns the number of engines added to the \fIel\fP list\&. .SS "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 \fBinputChanged()\fP\&. .SS "void SoEngine::notify (\fBSoNotList\fP * l)\fR [virtual]\fP" Notifies all auditors for this instance when changes are made\&. .PP Reimplemented from \fBSoFieldContainer\fP\&. .SS "\fBSoEngine\fP * SoEngine::copy (void ) const" Make a duplicate of this engine and return a pointer to the duplicate\&. .PP Connections are shallow copied, i\&.e\&. the node or engine instance at the other end of the connection is \fInot\fP cloned\&. We just let the connection reference from the cloned engine refer to the same instance as the engine we've cloned ourselves from\&. .PP Note that this is \fInot\fP 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 \fBcopyContents()\fP method\&. Your overridden \fBcopyContents()\fP method should then \fIboth\fP copy internal data as well as calling the parent superclass' \fBcopyContents()\fP method for automatically handling of fields and other common data\&. .SS "\fBSoFieldContainer\fP * SoEngine::copyThroughConnection (void ) const\fR [virtual]\fP" Return copy of this instance\&. .PP Note: default implementation just returns \fRthis\fP pointer, \fBSoNode\fP and \fBSoEngine\fP overrides this method to return the pointer to the actual copy\&. .PP Reimplemented from \fBSoFieldContainer\fP\&. .SS "SbBool SoEngine::shouldCopy (void ) const" Returns whether this engine should be copied or simply referenced in a copy operation\&. .PP Engines which are not really part of the scene graph should not be copied\&. .SS "void SoEngine::writeInstance (\fBSoOutput\fP * out)\fR [virtual]\fP" Writes all the fields contained in this instance to the output stream within \fIout\fP\&. .PP This method is solely called from the write methods of fields\&. .PP Either from \fBSoField\fP if the write is done because of a field-to-field connection, or from one of the fields which may actually write \fBSoFieldContainer\fP instances, i\&.e\&. \fBSoSFNode\fP, \fBSoMFNode\fP, \fBSoSFEngine\fP, \fBSoMFEngine\fP, \fBSoSFPath\fP and \fBSoMFPath\fP\&. .PP This method, in addition to the ordinary write() method of \fBSoNode\fP, needs to be present since the fields don't have a write action instance in their writeValue() method, and \fBwriteInstance()\fP will create a new \fBSoWriteAction\fP and call continueToApply() on it\&. .PP Reimplemented from \fBSoFieldContainer\fP\&. .PP Reimplemented in \fBSoElapsedTime\fP, and \fBSoTimeCounter\fP\&. .SS "virtual void SoEngine::evaluate (void )\fR [protected]\fP, \fR [pure virtual]\fP" \fIThis API member is considered internal to the library, as it is not likely to be of interest to the application programmer\&.\fP .br .br .PP Implemented in \fBSoHeightMapToNormalMap\fP, and \fBSoProfilerTopEngine\fP\&. .SS "SbBool SoEngine::readInstance (\fBSoInput\fP * in, unsigned short flags)\fR [protected]\fP, \fR [virtual]\fP" This method is mainly intended for internal use during file import operations\&. .PP It reads a definition of an instance from the input stream \fIin\fP\&. The input stream state points to the start of a serialized / persistent representation of an instance of this class type\&. .PP \fRTRUE\fP or \fRFALSE\fP 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 \fRFALSE\fP\&. .PP \fIflags\fP is used internally during binary import when reading user extension nodes, group nodes or engines\&. .PP Reimplemented from \fBSoFieldContainer\fP\&. .SS "void SoEngine::inputChanged (\fBSoField\fP * which)\fR [protected]\fP, \fR [virtual]\fP" 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\&. .PP Reimplemented in \fBSoCalculator\fP, \fBSoGate\fP, \fBSoHeightMapToNormalMap\fP, and \fBSoTimeCounter\fP\&. .SS "const \fBSoFieldData\fP ** SoEngine::getInputDataPtr (void )\fR [static]\fP, \fR [protected]\fP" Returns the \fBSoFieldData\fP class which holds information about inputs in this engine\&. .SS "const \fBSoEngineOutputData\fP ** SoEngine::getOutputDataPtr (void )\fR [static]\fP, \fR [protected]\fP" Returns the \fBSoEngineOutputData\fP class which holds information about the outputs in this engine\&. .SS "void SoEngine::writeOutputTypes (\fBSoOutput\fP * out)\fR [protected]\fP" Writes the types of engine outputs for extension engines (i\&.e\&. engines not built in to Coin)\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.