Dungeon Architect  17.0.0
DungeonArchitect.Builders.Grid.GridDungeonModel Class Reference

Data model for the grid based dungeon builder More...

Inheritance diagram for DungeonArchitect.Builders.Grid.GridDungeonModel:
DungeonArchitect.DungeonModel

Public Member Functions

GridCellInfo GetGridCellLookup (int x, int z)
 Get meta-data about the grid in x, z grid coordinate More...
 
void BuildSpatialCellLookup ()
 Builds a lookup for fast data retrieval More...
 
void BuildCellLookup ()
 Builds the cell lookup for faster cell retrieval More...
 
Cell GetCell (int Id)
 Gets the cell information More...
 
Cell FindCellByPosition (IntVector position)
 Finds the cell based on the position in grid coordinates More...
 
override void ResetModel ()
 Clears the dungeon data model More...
 
bool ContainsStairAtLocation (int x, int z)
 
StairInfo GetStairAtLocation (int x, int z)
 
bool ContainsStair (int cellA, int cellB)
 Check if a stair exists between the two cells More...
 
- Public Member Functions inherited from DungeonArchitect.DungeonModel
virtual DungeonToolData CreateToolDataInstance ()
 

Public Attributes

DoorManager DoorManager = new DoorManager()
 
GridDungeonConfig Config
 
List< CellCells = new List<Cell>()
 
Dictionary< int, List< StairInfo > > CellStairs = new Dictionary<int, List<StairInfo>>()
 
Dictionary< int, Dictionary< int, GridCellInfo > > GridCellInfoLookup = new Dictionary<int, Dictionary<int, GridCellInfo>>()
 
Dictionary< int, CellCellLookup = new Dictionary<int, Cell>()
 Cell lookup based on the Cell Id More...
 
- Public Attributes inherited from DungeonArchitect.DungeonModel
DungeonToolData ToolData
 

Properties

CellDoor[] Doors [get]
 The list of registered doors More...
 

Detailed Description

Data model for the grid based dungeon builder

Definition at line 393 of file GridDungeonModel.cs.

Member Function Documentation

◆ BuildCellLookup()

void DungeonArchitect.Builders.Grid.GridDungeonModel.BuildCellLookup ( )

Builds the cell lookup for faster cell retrieval

Definition at line 471 of file GridDungeonModel.cs.

◆ BuildSpatialCellLookup()

void DungeonArchitect.Builders.Grid.GridDungeonModel.BuildSpatialCellLookup ( )

Builds a lookup for fast data retrieval

Definition at line 431 of file GridDungeonModel.cs.

◆ ContainsStair()

bool DungeonArchitect.Builders.Grid.GridDungeonModel.ContainsStair ( int  cellA,
int  cellB 
)

Check if a stair exists between the two cells

Parameters
cellA
cellB
Returns

Definition at line 552 of file GridDungeonModel.cs.

◆ FindCellByPosition()

Cell DungeonArchitect.Builders.Grid.GridDungeonModel.FindCellByPosition ( IntVector  position)

Finds the cell based on the position in grid coordinates

Parameters
positionPosition to lookup in grid cooridnates
Returns
Cell information at that location. Returns null if none found

Definition at line 500 of file GridDungeonModel.cs.

◆ GetCell()

Cell DungeonArchitect.Builders.Grid.GridDungeonModel.GetCell ( int  Id)

Gets the cell information

Parameters
IdId of the cell to lookup
Returns

Definition at line 485 of file GridDungeonModel.cs.

◆ GetGridCellLookup()

GridCellInfo DungeonArchitect.Builders.Grid.GridDungeonModel.GetGridCellLookup ( int  x,
int  z 
)

Get meta-data about the grid in x, z grid coordinate

Parameters
xX value in grid coordinate
zZ value in grid cooridnate
Returns

Definition at line 419 of file GridDungeonModel.cs.

◆ ResetModel()

override void DungeonArchitect.Builders.Grid.GridDungeonModel.ResetModel ( )
virtual

Clears the dungeon data model

Reimplemented from DungeonArchitect.DungeonModel.

Definition at line 515 of file GridDungeonModel.cs.

Member Data Documentation

◆ CellLookup

Dictionary<int, Cell> DungeonArchitect.Builders.Grid.GridDungeonModel.CellLookup = new Dictionary<int, Cell>()

Cell lookup based on the Cell Id

Definition at line 493 of file GridDungeonModel.cs.

Property Documentation

◆ Doors

CellDoor [] DungeonArchitect.Builders.Grid.GridDungeonModel.Doors
get

The list of registered doors

Definition at line 460 of file GridDungeonModel.cs.


The documentation for this class was generated from the following file: