Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
General Uses of Engines

Engines are generally used in two different ways:

Mechanisms Made from a Set of Link Classes

Objects That Use Engines for Animation and Placement

As shown in Using the Real-Time Global Field later in this chapter, you can connect parts of a scene to a clock so that animation in the scene occurs in relation to changes in time. Using a Calculator Engine shows an example of constraints, where the movement of an object is constrained to a set path.

You can think of an engine as a black box that receives input values, performs some operation on them, and then copies the results into one or more outputs. Both the inputs and the outputs of the engine 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.

An engine, shown in Anatomy of an Engine , has inputs derived from SoField and outputs derived from SoEngineOutput. Each engine evaluates a built-in function when its input values change. The resulting output values are then sent to all fields and engines connected to that engine. Because SoEngine is derived from the SoBase class, it includes methods for reading and writing to files.

Anatomy of an Engine

For example, the engine shown in Anatomy of an Engine could represent SoComposeVec4f, an engine that creates an SoMFVec4f object. It has four inputs of type SoMFFloat and one output of type SoMFVec4f. This engine composes the four inputs into one SoMFVec4f output.