Open Inventor Reference
SoEngine Class Reference

Base class for all engines. More...

#include <Inventor/engines/SoEngine.h>

Inheritance diagram for SoEngine:
SoFieldContainer SoBase SoBoolOperation SoCalculator SoComposeMatrix SoComposeRotation SoComposeRotationFromTo SoComposeVec2f SoComposeVec3f SoComposeVec4f SoComputeBoundingBox SoConcatenate SoCounter SoDecomposeMatrix SoDecomposeRotation SoDecomposeVec2f SoDecomposeVec3f SoDecomposeVec4f SoElapsedTime SoFieldConverter SoGate SoInterpolate SoOneShot SoOnOff SoSelectOne SoTimeCounter SoTransformVec3f SoTriggerAny SoUnknownEngine

List of all members.

Public Member Functions

virtual int getOutputs (SoEngineOutputList &list) const
 Returns a list of outputs in this engine.
SoEngineOutputgetOutput (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).
SoEnginecopy () 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 SoEngineOutputDatagetOutputData () const =0
 Info on outputs:
virtual void writeInstance (SoOutput *out)
 Writes instance to SoOutput. (Used only for last stage of writing)
virtual SoFieldContainercopyThroughConnection () 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 SoEnginegetByName (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

Detailed Description

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.

See Also
SoBoolOperation, SoCalculator, SoComposeMatrix, SoComposeRotation, SoComposeRotationFromTo, SoComposeVec2f, SoComposeVec3f, SoComposeVec4f, SoComputeBoundingBox, SoConcatenate, SoCounter, SoDecomposeMatrix, SoDecomposeRotation, SoDecomposeVec2f, SoDecomposeVec3f, SoDecomposeVec4f, SoElapsedTime, SoGate, SoInterpolate, SoOnOff, SoOneShot, SoSelectOne, SoTimeCounter, SoTransformVec3f, SoTriggerAny

Definition at line 102 of file SoEngine.h.


Constructor & Destructor Documentation

SoEngine::SoEngine ( ) [protected]
SoEngine::~SoEngine ( ) [protected]

Member Function Documentation

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 SoEngine* SoEngine::getByName ( const SbName name) [static]
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::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.

virtual SbBool SoEngine::readInstance ( SoInput in,
unsigned short  flags 
) [protected, virtual]

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]

Friends And Related Function Documentation

friend class SoEngineOutput [friend]

Definition at line 199 of file SoEngine.h.


The documentation for this class was generated from the following file: