Ejemplo n.º 1
0
 private static IntPtr Create(Context context, Query query, EnumerationErrors errors)
 {
     IntPtr handle;
     UInt32 status = OpenNIImporter.xnCreateIRGenerator(context.InternalObject, out handle,
         query == null ? IntPtr.Zero : query.InternalObject,
         errors == null ? IntPtr.Zero : errors.InternalObject);
     WrapperUtils.CheckStatus(status);
     return handle;
 }
Ejemplo n.º 2
0
		private static IntPtr Create(Context context, Query query, EnumerationErrors errors)
		{
            IntPtr handle;
            int status = SafeNativeMethods.xnCreateDevice(context.InternalObject, out handle,
                query == null ? IntPtr.Zero : query.InternalObject,
                errors == null ? IntPtr.Zero : errors.InternalObject);
            WrapperUtils.ThrowOnError(status);
            return handle;
        }
Ejemplo n.º 3
0
 public DepthGenerator(Context context, Query query, EnumerationErrors errors)
     : this(context, Create(context, query, errors), false)
 {
 }
Ejemplo n.º 4
0
 private static IntPtr InitFromXmlEx(string xmlFile, out IntPtr hScriptNode)
 {
     IntPtr pContext;
     EnumerationErrors errors = new EnumerationErrors();
     int status = SafeNativeMethods.xnInitFromXmlFileEx(xmlFile, out pContext, errors.InternalObject, out hScriptNode);
     WrapperUtils.CheckEnumeration(status, errors);
     return pContext;
 }
Ejemplo n.º 5
0
 private static IntPtr InitFromXml(string xmlFile)
 {
     IntPtr pContext;
     EnumerationErrors errors = new EnumerationErrors();
     #pragma warning disable 612
     int status = SafeNativeMethods.xnInitFromXmlFile(xmlFile, out pContext, errors.InternalObject);
     #pragma warning restore 612
     WrapperUtils.CheckEnumeration(status, errors);
     return pContext;
 }
Ejemplo n.º 6
0
        internal IntPtr CreateAnyProductionTreeImpl(NodeType type, Query query)
        {
            IntPtr nodeHandle;
            using (EnumerationErrors errors = new EnumerationErrors())
            {
                int status = SafeNativeMethods.xnCreateAnyProductionTree(this.InternalObject, type,
                    query == null ? IntPtr.Zero : query.InternalObject,
                    out nodeHandle, errors.InternalObject);
                WrapperUtils.CheckEnumeration(status, errors);
            }

            return nodeHandle;
        }
Ejemplo n.º 7
0
 public ProductionNode RunXmlScriptFromFileEx(string xmlFile)
 {
     EnumerationErrors errors = new EnumerationErrors();
     IntPtr hScriptNode;
     int status = SafeNativeMethods.xnContextRunXmlScriptFromFileEx(this.InternalObject, xmlFile, errors.InternalObject, out hScriptNode);
     WrapperUtils.CheckEnumeration(status, errors);
     return new ScriptNode(this, hScriptNode, false);
 }
Ejemplo n.º 8
0
 public void RunXmlScriptFromFile(string xmlFile)
 {
     this.usingDeprecatedAPI = true;
     EnumerationErrors errors = new EnumerationErrors();
     int status = SafeNativeMethods.xnContextRunXmlScriptFromFile(this.InternalObject, xmlFile, errors.InternalObject);
     WrapperUtils.CheckEnumeration(status, errors);
 }
Ejemplo n.º 9
0
        public NodeInfoList EnumerateProductionTrees(NodeType type, Query query)
        {
            IntPtr resultList;

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

            return new NodeInfoList(resultList);
        }
Ejemplo n.º 10
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;
 }
Ejemplo n.º 11
0
 public void RunXmlScriptFromFile(string xmlFile)
 {
     EnumerationErrors errors = new EnumerationErrors();
     UInt32 status = OpenNIImporter.xnContextRunXmlScriptFromFile(this.InternalObject, xmlFile, errors.InternalObject);
     WrapperUtils.CheckEnumeration(status, errors);
 }
Ejemplo n.º 12
0
 public SceneAnalyzer(Context context, Query query, EnumerationErrors errors)
     : this(context, Create(context, query, errors), false)
 {
 }
Ejemplo n.º 13
0
 public GestureGenerator(Context context, Query query, EnumerationErrors errors)
     : this(Create(context, query, errors), false)
 {
 }