OpenNI.Context.CreateProductionNodeFromNative C# (CSharp) Method

CreateProductionNodeFromNative() public static method

public static CreateProductionNodeFromNative ( IntPtr nodeHandle ) : OpenNI.ProductionNode
nodeHandle System.IntPtr
return OpenNI.ProductionNode
        public static ProductionNode CreateProductionNodeFromNative(IntPtr nodeHandle)
        {
            IntPtr pContext = SafeNativeMethods.xnGetRefContextFromNodeHandle(nodeHandle);
            Context context = Context.FromNative(pContext);
            SafeNativeMethods.xnContextRelease(pContext);
            return context.CreateProductionNodeObject(nodeHandle);
        }

Usage Example

コード例 #1
0
        private void NodeCreationCallback(IntPtr pContext, IntPtr hCreatedNode, IntPtr pCookie)
        {
            EventHandler <NodeCreatedEventArgs> handlers = this.nodeCreated;

            if (handlers != null)
            {
                ProductionNode       createdNode = Context.CreateProductionNodeFromNative(hCreatedNode);
                NodeCreatedEventArgs args        = new NodeCreatedEventArgs(createdNode);
                handlers(this, args);
            }
        }
All Usage Examples Of OpenNI.Context::CreateProductionNodeFromNative