SoEngine(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸ’– 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, with copyconnections=FALSE default.
  • 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=FALSE default.
  • 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 inheriting SoBase. This is used for runtime type checking and downward"casting.
  • SbBool isOfType (SoType type) const β€” Returns TRUE if 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 the SoType object 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 an SoEngineList.

πŸŽ€ 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 the SoType object 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 the SoType object 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:

  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.

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 the copyContents() method. Your overridden copyContents() 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 returns this pointer, and SoNode and SoEngine override 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