root/src/BRAINSFramework/Map/WorldMap.cs
| 13 | 20 | ||
|---|---|---|---|
14 | /// </summary> | 14 | /// </summary> |
15 | public class WorldMap | 15 | public class WorldMap |
16 | { | 16 | { |
17 | /// <summary> | ||
18 | /// Gets the Quadtree of all cells in the map | ||
19 | /// </summary> | ||
17 | public QuadTree<GridCell> GridCellTree; | 20 | public QuadTree<GridCell> GridCellTree; |
21 | |||
22 | /// <summary> | ||
23 | /// Gets the cluster of grids | ||
24 | /// </summary> | ||
18 | public Cluster ClusterGrid { get { return _clusterGrid; } } | 25 | public Cluster ClusterGrid { get { return _clusterGrid; } } |
19 | 26 | ||
20 | private Cluster _clusterGrid; | 27 | private Cluster _clusterGrid; |
... | ... | ||
22 | private int _height; | 29 | private int _height; |
23 | private List<GridCell> _allCells=new List<GridCell>(); | 30 | private List<GridCell> _allCells=new List<GridCell>(); |
24 | 31 | ||
32 | /// <summary> | ||
33 | /// Gets all of the cells in the map | ||
34 | /// </summary> | ||
25 | public List<GridCell> AllCells | 35 | public List<GridCell> AllCells |
26 | { | 36 | { |
27 | get { return _allCells; } | 37 | get { return _allCells; } |
28 | set { _allCells = value; } | 38 | set { _allCells = value; } |
29 | } | 39 | } |
30 | 40 | ||
41 | /// <summary> | ||
42 | /// Gets the top left position of the world | ||
43 | /// </summary> | ||
31 | public Vector2 TopLeft | 44 | public Vector2 TopLeft |
32 | { | 45 | { |
33 | get { return _clusterGrid.Grids[0].Position; } | 46 | get { return _clusterGrid.Grids[0].Position; } |
34 | } | 47 | } |
35 | 48 | ||
49 | /// <summary> | ||
50 | /// Gets the bottom right position of the world | ||
51 | /// </summary> | ||
36 | public Vector2 BottomRight | 52 | public Vector2 BottomRight |
37 | { | 53 | { |
38 | get { return _clusterGrid.Grids[_clusterGrid.Grids.Count - 1].Position + _clusterGrid.Grids[_clusterGrid.Grids.Count - 1].Size; } | 54 | get { return _clusterGrid.Grids[_clusterGrid.Grids.Count - 1].Position + _clusterGrid.Grids[_clusterGrid.Grids.Count - 1].Size; } |
39 | } | 55 | } |
56 | |||
40 | internal WorldMap(int width, int height) | 57 | internal WorldMap(int width, int height) |
41 | { | 58 | { |
42 | _clusterGrid = new Cluster(); | 59 | _clusterGrid = new Cluster(); |
Download diff