Exemple #1
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;
        }
Exemple #2
0
 public DepthGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
Exemple #3
0
 public DepthGenerator(Context context, Query query, EnumerationErrors errors)
     : this(context, Create(context, query, errors), false)
 {
 }
Exemple #4
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;
        }
Exemple #5
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);
        }
Exemple #6
0
 public ProductionNode CreateAnyProductionTree(NodeType type, Query query)
 {
     IntPtr nodeHandle = CreateAnyProductionTreeImpl(type, query);
     ProductionNode result = CreateProductionNodeObject(nodeHandle, type);
     // release the handle (result now owns it)
     SafeNativeMethods.xnProductionNodeRelease(nodeHandle);
     return result;
 }
Exemple #7
0
 public AudioGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
Exemple #8
0
 public HandsGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
Exemple #9
0
 public UserGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
Exemple #10
0
 public Device(Context context, Query query)
     : this(context, query, null)
 {
 }
Exemple #11
0
 public SceneAnalyzer(Context context, Query query)
     : this(context, query, null)
 {
 }
Exemple #12
0
 public SceneAnalyzer(Context context, Query query, EnumerationErrors errors)
     : this(context, Create(context, query, errors), false)
 {
 }
Exemple #13
0
 public ImageGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
Exemple #14
0
 public GestureGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
Exemple #15
0
 private static IntPtr Create(Context context, Query query)
 {
     return context.CreateAnyProductionTreeImpl(NodeType.Device, query);
 }
Exemple #16
0
 public Device(Context context, Query query)
     : this(context, Create(context, query), false)
 {
 }