OpenNI 1.5.4
|
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 Type | Module Interface |
---|---|
Production Node | xn::ModuleProductionNode |
Device | xn::ModuleDevice |
Generator | xn::ModuleGenerator |
Recorder | xn::ModuleRecorder |
Player | xn::ModulePlayer |
Map Generator | xn::ModuleMapGenerator |
Depth Generator | xn::ModuleDepthGenerator |
Image Generator | xn::ModuleImageGenerator |
IR Generator | xn::ModuleIRGenerator |
Gestures Generator | xn::ModuleGestureGenerator |
Scene Analyzer | xn::ModuleSceneAnalyzer |
Hands Generator | xn::ModuleHandsGenerator |
User Generator | xn::ModuleUserGenerator |
Audio Generator | xn::ModuleAudioGenerator |
Codec | xn::ModuleCodec |
Script | xn::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 { ... };
Generated on Wed May 16 2012 10:16:06 for OpenNI 1.5.4 by 1.7.5.1