示例#1
0
        public void RunXmlScriptFromFile(string xmlFile)
        {
            EnumerationErrors errors = new EnumerationErrors();
            UInt32            status = OpenNIImporter.xnContextRunXmlScriptFromFile(this.InternalObject, xmlFile, errors.InternalObject);

            WrapperUtils.CheckEnumeration(status, errors);
        }
示例#2
0
        private static IntPtr InitFromXml(string xmlFile)
        {
            IntPtr            pContext;
            EnumerationErrors errors = new EnumerationErrors();
            UInt32            status = OpenNIImporter.xnInitFromXmlFile(xmlFile, out pContext, errors.InternalObject);

            WrapperUtils.CheckEnumeration(status, errors);
            return(pContext);
        }
示例#3
0
        internal IntPtr CreateAnyProductionTreeImpl(NodeType type, Query query)
        {
            IntPtr nodeHandle;

            using (EnumerationErrors errors = new EnumerationErrors())
            {
                UInt32 status = OpenNIImporter.xnCreateAnyProductionTree(this.InternalObject, type,
                                                                         query == null ? IntPtr.Zero : query.InternalObject,
                                                                         out nodeHandle, errors.InternalObject);
                WrapperUtils.CheckEnumeration(status, errors);
            }

            return(nodeHandle);
        }
示例#4
0
        public NodeInfoList EnumerateProductionTrees(NodeType type, Query query)
        {
            IntPtr resultList;

            using (EnumerationErrors errors = new EnumerationErrors())
            {
                UInt32 status = OpenNIImporter.xnEnumerateProductionTrees(this.InternalObject, type,
                                                                          query == null ? IntPtr.Zero : query.InternalObject,
                                                                          out resultList,
                                                                          errors.InternalObject);
                WrapperUtils.CheckEnumeration(status, errors);
            }

            return(new NodeInfoList(resultList));
        }