22 #ifndef __PLUGINS_OPENNI_UTILS_SETUP_H_ 23 #define __PLUGINS_OPENNI_UTILS_SETUP_H_ 25 #include <core/exception.h> 26 #include <core/utils/lockptr.h> 28 #include <XnCppWrapper.h> 41 unsigned int &width,
unsigned int &height);
43 void setup_map_generator(xn::MapGenerator &generator,
46 void setup_alternate_viewpoint(xn::Generator &gen, xn::Generator &target);
47 void setup_synchronization(xn::Generator &gen, xn::Generator &target);
49 void get_usb_info(xn::Generator &gen,
unsigned short &vendor,
unsigned short &product);
62 template<
class ProdNodeClass>
64 XnProductionNodeType type, ProdNodeClass *node)
67 if ((st = openni->FindExistingNode(type, *node)) != XN_STATUS_OK) {
68 xn::EnumerationErrors errors;
69 if (node->Create(*(openni.operator->()), 0, &errors) != XN_STATUS_OK) {
71 xnGetStatusString(st));
72 for (xn::EnumerationErrors::Iterator i = errors.Begin();
73 i != errors.End(); ++i)
75 XnProductionNodeDescription d = i.Description();
76 e.append(
"%s: %s/%s/%u.%u.%u.%u: %s",
77 xnProductionNodeTypeToString(d.Type),
78 d.strVendor, d.strName, d.Version.nMajor, d.Version.nMinor,
79 d.Version.nMaintenance, d.Version.nBuild,
80 xnGetStatusString(i.Error()));
Fawkes library namespace.
Base class for exceptions in Fawkes.
Interface for configuration handling.