OpenNI 1.5.7
Implement the Proper Interface

Note that OpenNI has a different interface for a node implementation (MPI) than the actual API of the node. Although they seem superficially very similar, the MPI and API interfaces are different.

The module's MPI interfaces (C++ ones) are defined in file XnModuleCppInterface.h.

The following table lists current OpenNI node types and their module interface.

Node TypeModule Interface
Production Nodexn::ModuleProductionNode
Devicexn::ModuleDevice
Generatorxn::ModuleGenerator
Recorderxn::ModuleRecorder
Playerxn::ModulePlayer
Map Generatorxn::ModuleMapGenerator
Depth Generatorxn::ModuleDepthGenerator
Image Generatorxn::ModuleImageGenerator
IR Generatorxn::ModuleIRGenerator
Gestures Generatorxn::ModuleGestureGenerator
Scene Analyzerxn::ModuleSceneAnalyzer
Hands Generatorxn::ModuleHandsGenerator
User Generatorxn::ModuleUserGenerator
Audio Generatorxn::ModuleAudioGenerator
Codecxn::ModuleCodec
Scriptxn::ModuleScriptNode

When you want to create a new class, it must inherit virtually from the corresponding interface. For example, if you are developing a hand generator, the class declaration must be as follows:

class MyHandGenerator: public virtual xn::ModuleHandsGenerator
{
...
};
Definition XnModuleCppInterface.h:452