using System.Collections.Generic; using Robust.Shared.Maths; namespace Robust.Shared.Map { internal interface IMapGridInternal : IMapGrid { /// /// The total number of chunks contained on this grid. /// int ChunkCount { get; } /// /// Returns the chunk at the given indices. If the chunk does not exist, /// then a new one is generated that is filled with empty space. /// /// The X index of the chunk in this grid. /// The Y index of the chunk in this grid. /// The existing or new chunk. MapChunk GetChunk(int xIndex, int yIndex); /// /// Removes the chunk with the specified origin. /// void RemoveChunk(Vector2i origin); /// /// Returns the chunk at the given indices. If the chunk does not exist, /// then a new one is generated that is filled with empty space. /// /// The indices of the chunk in this grid. /// The existing or new chunk. MapChunk GetChunk(Vector2i chunkIndices); /// /// Returns whether a chunk exists with the specified indices. /// bool HasChunk(Vector2i chunkIndices); /// /// Returns all chunks in this grid. This will not generate new chunks. /// /// All chunks in the grid. IReadOnlyDictionary GetMapChunks(); /// /// Returns all the intersecting the worldAABB. /// void GetMapChunks(Box2 worldAABB, out MapGrid.ChunkEnumerator enumerator); /// /// Returns all the intersecting the rotated world box. /// void GetMapChunks(Box2Rotated worldArea, out MapGrid.ChunkEnumerator enumerator); /// /// Regenerates the chunk local bounds of this chunk. /// void RegenerateCollision(MapChunk mapChunk); /// /// Calculate the world space AABB for this chunk. /// Box2 CalcWorldAABB(MapChunk mapChunk); /// /// Returns the tile at the given chunk indices. /// /// /// /// The X tile index relative to the chunk origin. /// The Y tile index relative to the chunk origin. /// A reference to a tile. TileRef GetTileRef(MapId mapId, MapChunk mapChunk, ushort xIndex, ushort yIndex); } }