/// <summary>
                /// Initializes a new instance of the <see cref="Query"/> struct.
                /// </summary>
                /// <param name="callback">The callback to trigger when query ends.</param>
                /// <param name="maxResults">Maximum amount of results desired.</param>
                /// <param name="requestBoundaries">Determines whether or not boundaries should be requested.</param>
                public Query(MLPlanes.QueryResultsDelegate callback, uint maxResults, bool requestBoundaries)
                {
                    this.Callback               = callback;
                    this.MaxResults             = maxResults;
                    this.Planes                 = default;
                    this.PlanesResultsUnmanaged = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(PlaneNative)) * (int)this.MaxResults);
                    this.PlaneBoundariesList    = BoundariesListNative.Create();
                    this.PlaneBoundaries        = default;
                    this.Result                 = MLResult.Create(MLResult.Code.Ok);

                    // Allows proper API selection based on query parameters and assigned callback.
                    this.IsRequestingBoundaries = requestBoundaries;
                }
 public static extern MLResult.Code MLPlanesQueryGetResultsWithBoundaries(ulong planesTracker, ulong queryHandle, IntPtr results, out uint numResults, ref BoundariesListNative planeBoundaries);
 public static extern MLResult.Code MLPlanesReleaseBoundariesList(ulong planesTracker, ref BoundariesListNative planeBoundaries);