.TH "SoEngine" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoEngine \- .PP \fBSoEngine\fP is the base class for Coin engines\&. .PP Engines enables the application programmers to make complex connections between fields\&. .SH SYNOPSIS .br .PP .PP \fC#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, \fBSoOneShot\fP, \fBSoOnOff\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 .SS "Static Public Member Functions" .in +1c .ti -1c .RI "static void \fBinitClass\fP (void)" .br .RI "\fISets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system\&. \fP" .ti -1c .RI "static void \fBinitClasses\fP (void)" .br .ti -1c .RI "static \fBSoType\fP \fBgetClassTypeId\fP (void)" .br .RI "\fIThis static method returns the \fBSoType\fP object associated with objects of this class\&. \fP" .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 .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 .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 .SS "Additional Inherited Members" .SH "Detailed Description" .PP \fBSoEngine\fP is the base class for Coin engines\&. .PP Engines enables the application programmers to make complex connections between fields\&. 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)\fC [protected]\fP" Default constructor\&. .SS "SoEngine::~SoEngine (void)\fC [protected]\fP, \fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "void SoEngine::initClasses (void)\fC [static]\fP" Initializes all engines\&. Automatically called from \fBSoEngine::initClass()\fP upon initialization of Coin\&. .PP Reimplemented in \fBSoFieldConverter\fP, and \fBSoInterpolate\fP\&. .SS "void SoEngine::evaluateWrapper (void)" Triggers an engine evaluation\&. .SS "int SoEngine::getOutputs (\fBSoEngineOutputList\fP &l) const\fC [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 \fCNULL\fP if no such output exists\&. .SS "SbBool SoEngine::getOutputName (const \fBSoEngineOutput\fP *output, \fBSbName\fP &outputname) const" Sets to the name of \fIoutput\fP\&. Returns \fCFALSE\fP if no such output is contained within the engine instance\&. .SS "const \fBSoEngineOutputData\fP * SoEngine::getOutputData (void) const\fC [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 .PP Implemented in \fBSoComposeMatrix\fP, \fBSoComposeRotationFromTo\fP, \fBSoComposeRotation\fP, \fBSoComposeVec2f\fP, \fBSoComposeVec3f\fP, \fBSoComposeVec4f\fP, \fBSoDecomposeMatrix\fP, \fBSoDecomposeVec2f\fP, \fBSoDecomposeVec3f\fP, \fBSoDecomposeVec4f\fP, \fBSoDecomposeRotation\fP, \fBSoCalculator\fP, \fBSoComputeBoundingBox\fP, \fBSoElapsedTime\fP, \fBSoGate\fP, \fBSoOneShot\fP, \fBSoTimeCounter\fP, \fBSoSelectOne\fP, \fBSoBoolOperation\fP, \fBSoCounter\fP, \fBSoConcatenate\fP, \fBSoHeightMapToNormalMap\fP, \fBSoOnOff\fP, \fBSoTransformVec3f\fP, \fBSoTriggerAny\fP, \fBSoFieldConverter\fP, \fBSoInterpolate\fP, \fBSoTexture2Convert\fP, \fBSoInterpolateFloat\fP, \fBSoInterpolateRotation\fP, \fBSoInterpolateVec2f\fP, \fBSoInterpolateVec3f\fP, and \fBSoInterpolateVec4f\fP\&. .SS "\fBSoEngine\fP * SoEngine::getByName (const \fBSbName\fP &name)\fC [static]\fP" Returns the engine named \fIname\fP, or \fCNULL\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)\fC [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)\fC [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, ie 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 aswell as calling the parent superclass' \fBcopyContents()\fP method for automatically handling of fields and other common data\&. .SS "\fBSoFieldContainer\fP * SoEngine::copyThroughConnection (void) const\fC [virtual]\fP" Return copy of this instance\&. .PP Note: default implementation just returns \fCthis\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 scenegraph should not be copied\&. .SS "void SoEngine::writeInstance (\fBSoOutput\fP *out)\fC [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 \fBSoTimeCounter\fP, and \fBSoElapsedTime\fP\&. .SS "void SoEngine::evaluate (void)\fC [protected]\fP, \fC [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 .PP Implemented in \fBSoHeightMapToNormalMap\fP\&. .SS "SbBool SoEngine::readInstance (\fBSoInput\fP *in, unsigned shortflags)\fC [protected]\fP, \fC [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 / persistant representation of an instance of this class type\&. .PP \fCTRUE\fP or \fCFALSE\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 \fCFALSE\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)\fC [protected]\fP, \fC [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 \fBSoTimeCounter\fP, \fBSoCalculator\fP, \fBSoGate\fP, and \fBSoHeightMapToNormalMap\fP\&. .SS "const \fBSoFieldData\fP ** SoEngine::getInputDataPtr (void)\fC [static]\fP, \fC [protected]\fP" Returns the \fBSoFieldData\fP class which holds information about inputs in this engine\&. .PP Reimplemented in \fBSoComposeMatrix\fP, \fBSoComposeRotationFromTo\fP, \fBSoComposeRotation\fP, \fBSoComposeVec2f\fP, \fBSoComposeVec3f\fP, \fBSoComposeVec4f\fP, \fBSoDecomposeMatrix\fP, \fBSoDecomposeVec2f\fP, \fBSoDecomposeVec3f\fP, \fBSoDecomposeVec4f\fP, \fBSoDecomposeRotation\fP, \fBSoCalculator\fP, \fBSoComputeBoundingBox\fP, \fBSoElapsedTime\fP, \fBSoGate\fP, \fBSoOneShot\fP, \fBSoTimeCounter\fP, \fBSoSelectOne\fP, \fBSoBoolOperation\fP, \fBSoCounter\fP, \fBSoConcatenate\fP, \fBSoHeightMapToNormalMap\fP, \fBSoOnOff\fP, \fBSoTransformVec3f\fP, \fBSoTriggerAny\fP, \fBSoFieldConverter\fP, \fBSoInterpolate\fP, \fBSoTexture2Convert\fP, \fBSoInterpolateFloat\fP, \fBSoInterpolateRotation\fP, \fBSoInterpolateVec2f\fP, \fBSoInterpolateVec3f\fP, and \fBSoInterpolateVec4f\fP\&. .SS "const \fBSoEngineOutputData\fP ** SoEngine::getOutputDataPtr (void)\fC [static]\fP, \fC [protected]\fP" Returns the \fBSoEngineOutputData\fP class which holds information about the outputs in this engine\&. .PP Reimplemented in \fBSoComposeMatrix\fP, \fBSoComposeRotationFromTo\fP, \fBSoComposeRotation\fP, \fBSoComposeVec2f\fP, \fBSoComposeVec3f\fP, \fBSoComposeVec4f\fP, \fBSoDecomposeMatrix\fP, \fBSoDecomposeVec2f\fP, \fBSoDecomposeVec3f\fP, \fBSoDecomposeVec4f\fP, \fBSoDecomposeRotation\fP, \fBSoCalculator\fP, \fBSoComputeBoundingBox\fP, \fBSoElapsedTime\fP, \fBSoGate\fP, \fBSoOneShot\fP, \fBSoTimeCounter\fP, \fBSoSelectOne\fP, \fBSoBoolOperation\fP, \fBSoCounter\fP, \fBSoConcatenate\fP, \fBSoHeightMapToNormalMap\fP, \fBSoOnOff\fP, \fBSoTransformVec3f\fP, \fBSoTriggerAny\fP, \fBSoFieldConverter\fP, \fBSoInterpolate\fP, \fBSoTexture2Convert\fP, \fBSoInterpolateFloat\fP, \fBSoInterpolateRotation\fP, \fBSoInterpolateVec2f\fP, \fBSoInterpolateVec3f\fP, and \fBSoInterpolateVec4f\fP\&. .SS "void SoEngine::writeOutputTypes (\fBSoOutput\fP *out)\fC [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\&.