SOSFENGINE(3iv)

✨ NAME ✨

SoSFEngine β€” it's a field, bestie, and what it holds is a pointer to an engine. That's the whole vibe. πŸŽ€


πŸ¦‹ INHERITS FROM πŸ¦‹

SoField > SoSField > SoSFEngine

so like… it's deep in the family tree, iykyk. πŸ’…


🌸 SYNOPSIS 🌸

#include <Inventor/fields/SoSFEngine.h>

Methods from class SoSFEngine:

static SoType       getClassTypeId()
virtual void        getTypeId() const
SoEngine *          getValue() const
SoEngine *          operator =(SoEngine * newValue)
void                setValue(SoEngine * newValue)
int                 operator ==(const SoSFEngine &f) const
int                 operator !=(const SoSFEngine &f) const

Methods from class SoField:

void                setIgnored(SbBool ignore)
SbBool              isIgnored() const
SbBool              isDefault() const
virtual SbBool      isOfType(SoType type) const
SbBool              set(const char *valueString)
void                get(SbString &valueString)
void                touch()
SbBool              connectFrom(SoField *fromField)
SbBool              connectFrom(SoEngineOutput *fromEngine)
void                disconnect()
SbBool              isConnected() const
SbBool              isConnectedFromField() const
SbBool              getConnectedField(SoField *&writingField) const
SbBool              isConnectedFromEngine() const
SbBool              getConnectedEngine(SoEngineOutput *&engineOutput)
                         const
void                enableConnection(SbBool flag)
SbBool              isConnectionEnabled() const
int                 getForwardConnections(SoFieldList &list) const
SoFieldContainer *  getContainer() const

like okay, that's a LOT of inherited methods but every single one is in there, no cap. πŸ‘‘


πŸ’œ DESCRIPTION πŸ’œ

So this field keeps a pointer to an SoEngine instance, and β€” this is the important part β€” it keeps that engine's reference count correct while it does it. Responsible queen behavior fr fr. 🫢

When you write an SoSFEngine out to a file, what gets written is the engine it's pointing at. Obsessed. Example:

mySoSFEngineField ElapsedTime {}

That right there is an SoSFEngine field named mySoSFEngineField, and it points to an SoElapsedTime engine. Iconic.

And if that engine is already being used somewhere else? Then the regular DEF/USE instancing mechanism kicks in, like always:

anotherSoSFEngineField USE calculator

That's an SoSFEngine field pointing to a engine named calculator that was DEF'ed earlier in the scene. Reuse, recycle, slay. 🌈


πŸŽ€ METHODS πŸŽ€

  • static SoType getClassTypeId()
  • virtual void getTypeId() const

Hands you the type β€” either for the class itself, or for one specific object of this class. Depends which one you call, bestie. ✨

  • SoEngine * getValue() const

Returns this field's value. That's it, that's the whole job. πŸ’–

  • SoEngine * operator =(SoEngine * newValue)
  • void setValue(SoEngine * newValue)

Sets this field to newValue. Both doors, same room. πŸšͺ

  • int operator ==(const SoSFEngine &f) const
  • int operator !=(const SoSFEngine &f) const

Returns TRUE if f is the same type as this field and has the same value as this field. Both things. No shortcuts. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

SoField, SoSField, SoMFEngine, SoEngine


and that's the whole page, angel πŸ’œ this was SoSFEngine(3IV)() from the 3IV manual, footer and all β€” go forth and point at engines responsibly. πŸ¦‹βœ¨