예제 #1
0
파일: Device.cs 프로젝트: FreeMiles/OpenNI
		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;
        }
예제 #2
0
 public DepthGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
예제 #3
0
 public DepthGenerator(Context context, Query query, EnumerationErrors errors)
     : this(context, Create(context, query, errors), false)
 {
 }
예제 #4
0
파일: Context.cs 프로젝트: penyatree/openni
        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;
        }
예제 #5
0
파일: Context.cs 프로젝트: penyatree/openni
        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);
        }
예제 #6
0
파일: Context.cs 프로젝트: penyatree/openni
 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;
 }
예제 #7
0
 public AudioGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
예제 #8
0
 public HandsGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
예제 #9
0
 public UserGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
예제 #10
0
파일: Device.cs 프로젝트: penyatree/openni
 public Device(Context context, Query query)
     : this(context, query, null)
 {
 }
예제 #11
0
 public SceneAnalyzer(Context context, Query query)
     : this(context, query, null)
 {
 }
예제 #12
0
 public SceneAnalyzer(Context context, Query query, EnumerationErrors errors)
     : this(context, Create(context, query, errors), false)
 {
 }
예제 #13
0
 public ImageGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
예제 #14
0
 public GestureGenerator(Context context, Query query)
     : this(context, query, null)
 {
 }
예제 #15
0
파일: Device.cs 프로젝트: hooface/OpenNI
 private static IntPtr Create(Context context, Query query)
 {
     return context.CreateAnyProductionTreeImpl(NodeType.Device, query);
 }
예제 #16
0
파일: Device.cs 프로젝트: hooface/OpenNI
 public Device(Context context, Query query)
     : this(context, Create(context, query), false)
 {
 }