Obtain Inputs

If the new node implementation requires any inputs - and it normally would need inputs - you can pass them to this class in its constructor or in an initialization method. Later on, you will pass these inputs to instances of this class. This will be done from the node exporter (see Creating the Node).

Note that if the inputs required are other nodes (for example, if your hand generator node requires an image generator), then those nodes must be received as API objects, and not as module objects (i.e., you must use xn::ImageGenerator and not xn::ModuleImageGenerator).

In our example:

class MyHandGenerator: public virtual xn::ModuleHandsGenerator
{
public:
MyHandsGenerator(xn::ImageGenerator imageGen);
...
};
xn::ImageGenerator
Definition XnCppWrapper.h:4940
xn::ModuleHandsGenerator
Definition XnModuleCppInterface.h:452