Enumeration Process

When OpenNI is initializing, it loads each registered module, and asks it for the types of nodes it implements. Then, when an application asks for a specific generated product, OpenNI enumerates every module that declared itself as generating that product, for currently possible production chains. Each module builds a list of production chains it can create right now (possible by enumerating for other node types), and returns it to OpenNI. OpenNI then appends all those lists together, and returns them to the application. The application can then choose the specific node it wants to use right now, and asks OpenNI to create it.

In most cases, the application will prefer (or even demand) certain constraints from those chains. For example, an application might need the node to support a specific capability it needs. For this reason, the enumeration functions can receive a Query object (see Queries for C, or xn::Query for C++).

NOTE: OpenNI may also return existing nodes during enumeration, if they match the requested criterias.

As a shortcut, in case the application doesn't care about different chains, and just needs any node of the requested type, it can do so using one of the following functions:

In C++ this can be done using

Note that just like in the full enumeration process, these functions also allow the application to specify certain constraints about the created nodes with a Query object, such as the vendor that supplies the generator, a version number, certain capabilities, and more (see Queries for the C functions, or xn::Query for the C++ functions).

Generated on Fri Nov 9 22:59:08 2012 for OpenNI 1.3.2 by  doxygen 1.6.3