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; }
public DepthGenerator(Context context, Query query) : this(context, query, null) { }
public DepthGenerator(Context context, Query query, EnumerationErrors errors) : this(context, Create(context, query, errors), false) { }
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; }
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); }
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; }
public AudioGenerator(Context context, Query query) : this(context, query, null) { }
public HandsGenerator(Context context, Query query) : this(context, query, null) { }
public UserGenerator(Context context, Query query) : this(context, query, null) { }
public Device(Context context, Query query) : this(context, query, null) { }
public SceneAnalyzer(Context context, Query query) : this(context, query, null) { }
public SceneAnalyzer(Context context, Query query, EnumerationErrors errors) : this(context, Create(context, query, errors), false) { }
public ImageGenerator(Context context, Query query) : this(context, query, null) { }
public GestureGenerator(Context context, Query query) : this(context, query, null) { }
private static IntPtr Create(Context context, Query query) { return context.CreateAnyProductionTreeImpl(NodeType.Device, query); }
public Device(Context context, Query query) : this(context, Create(context, query), false) { }