本文整理汇总了C++中xn::NodeInfoList::Add方法的典型用法代码示例。如果您正苦于以下问题:C++ NodeInfoList::Add方法的具体用法?C++ NodeInfoList::Add怎么用?C++ NodeInfoList::Add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xn::NodeInfoList
的用法示例。
在下文中一共展示了NodeInfoList::Add方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EnumerateProductionTrees
XnStatus XnExportedFileDevice::EnumerateProductionTrees(xn::Context& context, xn::NodeInfoList& TreesList, xn::EnumerationErrors* pErrors)
{
XnStatus nRetVal = XN_STATUS_OK;
XnProductionNodeDescription Description;
GetDescription(&Description);
nRetVal = TreesList.Add(Description, NULL, NULL);
XN_IS_STATUS_OK(nRetVal);
return (XN_STATUS_OK);
}
示例2: EnumerateProductionTrees
XnStatus ExportedRecorder::EnumerateProductionTrees(xn::Context& context, xn::NodeInfoList& TreesList, xn::EnumerationErrors* pErrors)
{
XnProductionNodeDescription description;
XnStatus nRetVal = XN_STATUS_OK;
GetDescription(&description);
nRetVal = TreesList.Add(description, CREATION_INFO, NULL);
XN_IS_STATUS_OK(nRetVal);
return XN_STATUS_OK;
}
示例3: EnumerateProductionTrees
XnStatus ExportedSampleDepth::EnumerateProductionTrees( xn::Context& context, xn::NodeInfoList& TreesList, xn::EnumerationErrors* pErrors )
{
XnStatus nRetVal = XN_STATUS_OK;
// return one option
XnProductionNodeDescription desc;
GetDescription(&desc);
nRetVal = TreesList.Add(desc, NULL, NULL);
XN_IS_STATUS_OK(nRetVal);
return (XN_STATUS_OK);
}
示例4: EnumerateProductionTrees
XnStatus XnExportedSensorDevice::EnumerateProductionTrees(xn::Context& context, xn::NodeInfoList& TreesList, xn::EnumerationErrors* /*pErrors*/)
{
XnStatus nRetVal = XN_STATUS_OK;
// enumerate connected sensors
XnUInt32 nCount = 0;
// check if sensor is connected
nRetVal = XnSensor::Enumerate(NULL, &nCount);
if (nRetVal != XN_STATUS_OUTPUT_BUFFER_OVERFLOW)
{
// no sensor connected
return XN_STATUS_DEVICE_NOT_CONNECTED;
}
// allocate according to count
XnConnectionString* pConnStrings;
XN_VALIDATE_CALLOC(pConnStrings, XnConnectionString, nCount);
nRetVal = XnSensor::Enumerate(pConnStrings, &nCount);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pConnStrings);
return (nRetVal);
}
XnProductionNodeDescription Description;
GetDescription(&Description);
for (XnUInt32 i = 0; i < nCount; ++i)
{
// Each connection string is a sensor. Return it if it wasn't created already.
if (FindCreatedDevice(context.GetUnderlyingObject(), pConnStrings[i]) == m_createdDevices.End())
{
nRetVal = TreesList.Add(Description, pConnStrings[i], NULL);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pConnStrings);
return (nRetVal);
}
}
}
xnOSFree(pConnStrings);
return (XN_STATUS_OK);
}
开发者ID:DogfishLab88,项目名称:debian-openni-sensor-avin2-sensorkinect,代码行数:46,代码来源:XnExportedSensorDevice.cpp
示例5: EnumerateProductionTrees
XnStatus XnExportedSensorDevice::EnumerateProductionTrees(xn::Context& context, xn::NodeInfoList& TreesList, xn::EnumerationErrors* pErrors)
{
XnStatus nRetVal = XN_STATUS_OK;
// enumerate connected sensors
XnUInt32 nCount = 0;
// check if sensor is connected
nRetVal = XnSensor::Enumerate(NULL, &nCount);
if (nRetVal != XN_STATUS_OUTPUT_BUFFER_OVERFLOW)
{
// no sensor connected
XN_LOG_WARNING_RETURN(XN_STATUS_DEVICE_NOT_CONNECTED, XN_MASK_DEVICE_SENSOR, "No PS sensor is connected!");
}
// allocate according to count
XnConnectionString* pConnStrings;
XN_VALIDATE_CALLOC(pConnStrings, XnConnectionString, nCount);
nRetVal = XnSensor::Enumerate(pConnStrings, &nCount);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pConnStrings);
return (nRetVal);
}
XnProductionNodeDescription Description;
GetDescription(&Description);
// each connection string is a sensor. return it
for (XnUInt32 i = 0; i < nCount; ++i)
{
nRetVal = TreesList.Add(Description, pConnStrings[i], NULL);
if (nRetVal != XN_STATUS_OK)
{
xnOSFree(pConnStrings);
return (nRetVal);
}
}
xnOSFree(pConnStrings);
return (XN_STATUS_OK);
}