OregonCore  revision fb2a440-git
Your Favourite TBC server
GridDefines.h File Reference
#include "Common.h"
#include "GameSystem/NGrid.h"
#include <cmath>

Go to the source code of this file.

Classes

struct  CoordPair< LIMIT >
 

Namespaces

 Oregon
 

Macros

#define MAX_NUMBER_OF_GRIDS   64
 
#define SIZE_OF_GRIDS   533.3333f
 
#define CENTER_GRID_ID   (MAX_NUMBER_OF_GRIDS/2)
 
#define CENTER_GRID_OFFSET   (SIZE_OF_GRIDS/2)
 
#define MIN_GRID_DELAY   (MINUTE*IN_MILLISECONDS)
 
#define MIN_MAP_UPDATE_DELAY   50
 
#define MAX_NUMBER_OF_CELLS   8
 
#define SIZE_OF_GRID_CELL   (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS)
 
#define CENTER_GRID_CELL_ID   (MAX_NUMBER_OF_CELLS*MAX_NUMBER_OF_GRIDS/2)
 
#define CENTER_GRID_CELL_OFFSET   (SIZE_OF_GRID_CELL/2)
 
#define TOTAL_NUMBER_OF_CELLS_PER_MAP   (MAX_NUMBER_OF_GRIDS*MAX_NUMBER_OF_CELLS)
 
#define MAP_RESOLUTION   128
 
#define MAP_SIZE   (SIZE_OF_GRIDS*MAX_NUMBER_OF_GRIDS)
 
#define MAP_HALFSIZE   (MAP_SIZE/2)
 

Typedefs

typedef GridRefManager< CorpseCorpseMapType
 
typedef GridRefManager< CreatureCreatureMapType
 
typedef GridRefManager< DynamicObjectDynamicObjectMapType
 
typedef GridRefManager< GameObjectGameObjectMapType
 
typedef GridRefManager< PlayerPlayerMapType
 
typedef Grid< Player, AllWorldObjectTypes, AllGridObjectTypes > GridType
 
typedef NGrid< MAX_NUMBER_OF_CELLS, Player, AllWorldObjectTypes, AllGridObjectTypes > NGridType
 
typedef TypeMapContainer< AllGridObjectTypes > GridTypeMapContainer
 
typedef TypeMapContainer< AllWorldObjectTypes > WorldTypeMapContainer
 
typedef CoordPair< MAX_NUMBER_OF_GRIDSGridCoord
 
typedef CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAPCellCoord
 

Functions

typedef TYPELIST_4 (Player, Creature, Corpse, DynamicObject) AllWorldObjectTypes
 
typedef TYPELIST_4 (GameObject, Creature, DynamicObject, Corpse) AllGridObjectTypes
 
template<class RET_TYPE , int CENTER_VAL>
RET_TYPE Oregon::Compute (float x, float y, float center_offset, float size)
 
GridCoord Oregon::ComputeGridCoord (float x, float y)
 
CellCoord Oregon::ComputeCellCoord (float x, float y)
 
CellCoord Oregon::ComputeCellCoord (float x, float y, float &x_off, float &y_off)
 
void Oregon::NormalizeMapCoord (float &c)
 
bool Oregon::IsValidMapCoord (float c)
 
bool Oregon::IsValidMapCoord (float x, float y)
 
bool Oregon::IsValidMapCoord (float x, float y, float z)
 
bool Oregon::IsValidMapCoord (float x, float y, float z, float o)
 

Macro Definition Documentation

#define CENTER_GRID_CELL_ID   (MAX_NUMBER_OF_CELLS*MAX_NUMBER_OF_GRIDS/2)

Definition at line 46 of file GridDefines.h.

Referenced by Oregon::ComputeCellCoord().

#define CENTER_GRID_CELL_OFFSET   (SIZE_OF_GRID_CELL/2)

Definition at line 47 of file GridDefines.h.

Referenced by Oregon::ComputeCellCoord().

#define CENTER_GRID_OFFSET   (SIZE_OF_GRIDS/2)

Definition at line 38 of file GridDefines.h.

Referenced by Oregon::ComputeGridCoord().

#define MAP_HALFSIZE   (MAP_SIZE/2)

Definition at line 54 of file GridDefines.h.

Referenced by Oregon::IsValidMapCoord(), and Oregon::NormalizeMapCoord().

#define MAP_SIZE   (SIZE_OF_GRIDS*MAX_NUMBER_OF_GRIDS)

Definition at line 53 of file GridDefines.h.

Referenced by Player::ContinueTaxiFlight().

#define MIN_GRID_DELAY   (MINUTE*IN_MILLISECONDS)

Definition at line 40 of file GridDefines.h.

Referenced by MapManager::SetGridCleanUpDelay(), and Map::SetTimer().

#define MIN_MAP_UPDATE_DELAY   50

Definition at line 41 of file GridDefines.h.

Referenced by World::LoadConfigSettings(), and MapManager::SetMapUpdateInterval().

#define SIZE_OF_GRID_CELL   (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS)

Definition at line 44 of file GridDefines.h.

Referenced by Map::ActiveObjectsNearGrid(), and Oregon::ComputeCellCoord().

Typedef Documentation

Definition at line 146 of file GridDefines.h.

Definition at line 60 of file GridDefines.h.

Definition at line 61 of file GridDefines.h.

Definition at line 62 of file GridDefines.h.

Definition at line 63 of file GridDefines.h.

Definition at line 145 of file GridDefines.h.

typedef Grid<Player, AllWorldObjectTypes, AllGridObjectTypes> GridType

Definition at line 66 of file GridDefines.h.

typedef TypeMapContainer<AllGridObjectTypes> GridTypeMapContainer

Definition at line 69 of file GridDefines.h.

typedef NGrid<MAX_NUMBER_OF_CELLS, Player, AllWorldObjectTypes, AllGridObjectTypes> NGridType

Definition at line 67 of file GridDefines.h.

Definition at line 64 of file GridDefines.h.

typedef TypeMapContainer<AllWorldObjectTypes> WorldTypeMapContainer

Definition at line 70 of file GridDefines.h.

Function Documentation

typedef TYPELIST_4 ( Player  ,
Creature  ,
Corpse  ,
DynamicObject   
)
typedef TYPELIST_4 ( GameObject  ,
Creature  ,
DynamicObject  ,
Corpse   
)