/// <summary> /// The cell size of the grid. /// </summary> /// <remarks> /// <para> /// Used for converting from grid units to world units. /// </para> /// </remarks> /// <returns>The cell size of the grid.</returns> public float GetCellSize() { if (IsDisposed) { return(-1); } return(CrowdProximityGridEx.dtpgGetCellSize(root)); }
/// <summary> /// The item count at the specified grid location. /// </summary> /// <param name="x"> /// The x-value of the grid location. [Limits: bounds[0] <= value <= bounds[2]] /// </param> /// <param name="y"> /// The y-value of the grid location. [Limits: bounds[1] <= value <= bounds[3]] /// </param> /// <returns>The item count at the specified grid location.</returns> public int GetItemCountAt(int x, int y) { if (IsDisposed) { return(-1); } return(CrowdProximityGridEx.dtpgGetItemCountAt(root, x, y)); }
/// <summary> /// Gets the bounds of the grid. [(minX, minY, maxX, maxY)] /// </summary> /// <remarks> /// To convert from grid units to world units, multipy by the grid's cell size. /// </remarks> /// <returns>The bounds of the grid.</returns> public int[] GetBounds() { if (IsDisposed) { return(null); } int[] bounds = new int[4]; CrowdProximityGridEx.dtpgGetBounds(root, bounds); return(bounds); }