Open Inventor Reference
|
Base class for all engines. More...
#include <Inventor/engines/SoEngine.h>
Public Member Functions | |
virtual int | getOutputs (SoEngineOutputList &list) const |
Returns a list of outputs in this engine. | |
SoEngineOutput * | getOutput (const SbName &outputName) const |
Returns a pointer to the engine output with the given name. | |
SbBool | getOutputName (const SoEngineOutput *output, SbName &outputName) const |
Returns (in outputName ) the name of the engine output (output ). | |
SoEngine * | copy () const |
Creates and returns an exact copy of the engine. | |
void | evaluateWrapper () |
wrapper for the user's evaluate() engine | |
virtual void | notify (SoNotList *list) |
Propagates modification notification through an instance. | |
virtual const SoEngineOutputData * | getOutputData () const =0 |
Info on outputs: | |
virtual void | writeInstance (SoOutput *out) |
Writes instance to SoOutput. (Used only for last stage of writing) | |
virtual SoFieldContainer * | copyThroughConnection () const |
Copies an instance that is encountered through a field connection. | |
SbBool | shouldCopy () const |
Recursive procedure that determines if this engine should be copied during a copy operation, or just referenced as is. | |
SbBool | isNotifying () const |
A very annoying double notification occurs with engines that enable their outputs during inputChanged; this flag prevents that: | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns the type identifier for the SoEngine class. | |
static SoEngine * | getByName (const SbName &name) |
Look up engine(s) by name. | |
static int | getByName (const SbName &name, SoEngineList &list) |
Look up engine(s) by name. | |
static void | initClass () |
Initializes base engine class. | |
static void | initClasses () |
Initialize ALL Inventor engine classes. | |
Protected Member Functions | |
virtual void | evaluate ()=0 |
User-written evaluation engine. | |
SoEngine () | |
Constructor, destructor. | |
~SoEngine () | |
virtual SbBool | readInstance (SoInput *in, unsigned short flags) |
Reads stuff into instance. Returns FALSE on error. | |
virtual void | inputChanged (SoField *whichField) |
This is called whenever the value of an input is changed. | |
void | writeOutputTypes (SoOutput *out) |
Write output type information for engines that are not built-in. | |
Static Protected Member Functions | |
static const SoFieldData ** | getInputDataPtr () |
This is used by the input&output inheritence mechanism, hidden in the SoSubEngine macros. | |
static const SoEngineOutputData ** | getOutputDataPtr () |
Friends | |
class | SoEngineOutput |
SoEngine is the abstract base class for all engines. Engines are objects used for animation and behavior. They are lightweight objects that are connected between nodes, the clock, and other engines to form interesting behaviorial objects (e.g., a spinning windmill).
Engines are used to animate parts of a scene and/or to constrain one part of a scene in relation to some other part of the scene. An engine receives a number of input values, performs some operation on them, and then copies the results into one or more output fields. Both the inputs and the outputs can be connected to other fields or engines in the scene graph. When an engine's output values change, those new values are sent to any fields or engines connected to them.
Definition at line 102 of file SoEngine.h.
SoEngine::SoEngine | ( | ) | [protected] |
SoEngine::~SoEngine | ( | ) | [protected] |
SoEngine* SoEngine::copy | ( | ) | const |
All connections to inputs are copied as is (without copying what's at the other end).
virtual SoFieldContainer* SoEngine::copyThroughConnection | ( | ) | const [virtual] |
Reimplemented from SoFieldContainer.
Reimplemented in SoConcatenate, SoGate, and SoSelectOne.
virtual void SoEngine::evaluate | ( | ) | [protected, pure virtual] |
void SoEngine::evaluateWrapper | ( | ) |
static int SoEngine::getByName | ( | const SbName & | name, |
SoEngineList & | list | ||
) | [static] |
static SoType SoEngine::getClassTypeId | ( | ) | [inline, static] |
Reimplemented from SoFieldContainer.
Definition at line 107 of file SoEngine.h.
static const SoFieldData** SoEngine::getInputDataPtr | ( | ) | [inline, static, protected] |
Definition at line 188 of file SoEngine.h.
SoEngineOutput* SoEngine::getOutput | ( | const SbName & | outputName | ) | const |
If no such output exists, NULL is returned.
virtual const SoEngineOutputData* SoEngine::getOutputData | ( | ) | const [pure virtual] |
static const SoEngineOutputData** SoEngine::getOutputDataPtr | ( | ) | [inline, static, protected] |
Definition at line 189 of file SoEngine.h.
SbBool SoEngine::getOutputName | ( | const SoEngineOutput * | output, |
SbName & | outputName | ||
) | const |
Returns FALSE if the engine output is not contained within the engine instance.
virtual int SoEngine::getOutputs | ( | SoEngineOutputList & | list | ) | const [virtual] |
Use getOutputName to get the names of the outputs, and use SoEngineOutput::getConnectionType to determine their types.
static void SoEngine::initClass | ( | ) | [static] |
Reimplemented from SoFieldContainer.
Reimplemented in SoBoolOperation, SoCalculator, SoComputeBoundingBox, SoConcatenate, SoCounter, SoElapsedTime, SoFieldConverter, SoGate, SoInterpolate, SoOneShot, SoOnOff, SoSelectOne, SoTimeCounter, SoTransformVec3f, SoTriggerAny, and SoUnknownEngine.
static void SoEngine::initClasses | ( | ) | [static] |
Reimplemented in SoFieldConverter, and SoInterpolate.
virtual void SoEngine::inputChanged | ( | SoField * | whichField | ) | [protected, virtual] |
The default method does nothing. Subclasses can override this to detect when a specific field is changed.
Reimplemented in SoCalculator, SoComputeBoundingBox, SoCounter, SoElapsedTime, SoGate, SoOneShot, SoOnOff, and SoTimeCounter.
SbBool SoEngine::isNotifying | ( | ) | const [inline] |
Definition at line 170 of file SoEngine.h.
virtual void SoEngine::notify | ( | SoNotList * | list | ) | [virtual] |
Reimplemented from SoFieldContainer.
Reimplemented from SoFieldContainer.
Reimplemented in SoElapsedTime, SoOneShot, and SoTimeCounter.
SbBool SoEngine::shouldCopy | ( | ) | const |
virtual void SoEngine::writeInstance | ( | SoOutput * | out | ) | [virtual] |
Reimplemented from SoFieldContainer.
Reimplemented in SoElapsedTime, SoOneShot, and SoTimeCounter.
void SoEngine::writeOutputTypes | ( | SoOutput * | out | ) | [protected] |
friend class SoEngineOutput [friend] |
Definition at line 199 of file SoEngine.h.