OpenNI.Context.EnumerateProductionTrees C# (CSharp) Method

EnumerateProductionTrees() public method

public EnumerateProductionTrees ( NodeType type ) : NodeInfoList
type NodeType
return NodeInfoList
        public NodeInfoList EnumerateProductionTrees(NodeType type)
        {
            return EnumerateProductionTrees(type, null);
        }

Same methods

Context::EnumerateProductionTrees ( NodeType type, Query query ) : NodeInfoList

Usage Example

コード例 #1
0
        void Open(int i)
		{
			try
			{
				Close(i);


                OpenNIState state = FState[i];
                var context = new Context();
				FState[i].Context = context;
                context.AddLicense(FLicense);
                context.GlobalMirror = false;


                NodeInfoList list = context.EnumerateProductionTrees(global::OpenNI.NodeType.Device, null);
                NodeInfo node = null;
                if (FPinInNodes[i] != "")
                {
                    foreach (NodeInfo nodeitem in list)
                    {
                        if (nodeitem.CreationInfo == FPinInNodes[i])
                        {
                            node = nodeitem;
                            break;
                        }
                    }

                    if (node == null)
                        throw (new Exception("This device is unavailable. Check upstream ListDevices node"));

                    context.CreateProductionTree(node);
                }

                state.DepthGenerator = new DepthGenerator(context);
                MapOutputMode depthMode = new MapOutputMode();
                depthMode.FPS = 30;
                depthMode.XRes = 640;
                depthMode.YRes = 480;
                state.DepthGenerator.MapOutputMode = depthMode;
                state.DepthGenerator.StartGenerating();

                state.Start();

                FPinOutContext[i] = state;
                FPinOutStatus[i] = "OK";
			}
			catch (Exception e)
			{
				Close(i);
				FPinOutStatus[i] = e.Message;
			}
		}
All Usage Examples Of OpenNI.Context::EnumerateProductionTrees