MCPcopy Create free account
hub / github.com/OpenNI/OpenNI / xnCreateScriptNode

Function xnCreateScriptNode

Source/OpenNI/XnOpenNI.cpp:6932–6953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6930}
6931
6932XN_C_API XnStatus xnCreateScriptNode(XnContext* pContext, const XnChar* strFormat, XnNodeHandle* phScript)
6933{
6934 XnStatus nRetVal = XN_STATUS_OK;
6935
6936 // for now we only support OpenNI XML format
6937 if (strcmp(strFormat, XN_SCRIPT_FORMAT_XML) != 0)
6938 {
6939 return XN_STATUS_NOT_IMPLEMENTED;
6940 }
6941
6942 XnNodeInfo* pInfo;
6943 XnProductionNodeDescription desc;
6944 GetOpenNIScriptNodeDescription(&desc);
6945
6946 nRetVal = xnNodeInfoAllocate(&desc, NULL, NULL, &pInfo);
6947 XN_IS_STATUS_OK(nRetVal);
6948
6949 nRetVal = xnCreateProductionTree(pContext, pInfo, phScript);
6950 XN_IS_STATUS_OK(nRetVal);
6951
6952 return (XN_STATUS_OK);
6953}
6954
6955XN_C_API const XnChar* xnScriptNodeGetSupportedFormat(XnNodeHandle hScript)
6956{

Calls 3

xnNodeInfoAllocateFunction · 0.85
xnCreateProductionTreeFunction · 0.85

Tested by

no test coverage detected