The following code shows how to fine control the enumeration process. It enumerates Production Chains for producing User output, reducing the options using a basic query, and then chooses the first one from all possibilities.
nRetVal = context.EnumerateProductionTrees(
XN_NODE_TYPE_USER, &query, possibleChains, NULL);
nRetVal = context.CreateProductionTree(selected);
#define XN_CAPABILITY_SKELETON
Definition XnTypes.h:320
@ XN_NODE_TYPE_USER
Definition XnTypes.h:120
Definition XnCppWrapper.h:1802
XnStatus GetInstance(ProductionNode &node) const
Definition XnCppWrapper.h:9779
Definition XnCppWrapper.h:2144
Iterator Begin() const
Definition XnCppWrapper.h:2336
Definition XnCppWrapper.h:1976
XnStatus SetVendor(const XnChar *strVendor)
Sets in the Query object the vendor name to search for.
Definition XnCppWrapper.h:2005
XnStatus AddSupportedCapability(const XnChar *strNeededCapability)
Sets in the Query object a capability that the Node Alternative must support.
Definition XnCppWrapper.h:2067
Definition XnCppWrapper.h:7693