6.2. Defining Inputs and Outputs

Declare the inputs and outputs for the engine in the header file. For example:

SoSFTrigger on;
SoSFTrigger off;
SoSFTrigger toggle;
SoEngineOutput isOn;  // (SoSFBool)
SoEngineOutput isOff; // (SoSFBool)

Note that, by convention, each output is commented with the field type for that output. The output type isn't formally specified in the header file, though. It's set up in the constructor in the source file.

Also be sure to include the files for the field classes used by the inputs of your new engine.