AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
GridDefines.h File Reference
#include "Common.h"
#include "MapDefines.h"
#include "NGrid.h"

Go to the source code of this file.

Classes

struct  CoordPair< LIMIT >
 

Namespaces

namespace  Acore
 

Macros

#define MAX_NUMBER_OF_CELLS   8
 
#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   1
 
#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 GridRefMgr< CorpseCorpseMapType
 
typedef GridRefMgr< CreatureCreatureMapType
 
typedef GridRefMgr< DynamicObjectDynamicObjectMapType
 
typedef GridRefMgr< GameObjectGameObjectMapType
 
typedef GridRefMgr< 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 TypeUnorderedMapContainer< AllMapStoredObjectTypes, ObjectGuidMapStoredObjectTypesContainer
 
typedef CoordPair< MAX_NUMBER_OF_GRIDSGridCoord
 
typedef CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAPCellCoord
 

Enumerations

enum  GridMapTypeMask {
  GRID_MAP_TYPE_MASK_CORPSE = 0x01 ,
  GRID_MAP_TYPE_MASK_CREATURE = 0x02 ,
  GRID_MAP_TYPE_MASK_DYNAMICOBJECT = 0x04 ,
  GRID_MAP_TYPE_MASK_GAMEOBJECT = 0x08 ,
  GRID_MAP_TYPE_MASK_PLAYER = 0x10 ,
  GRID_MAP_TYPE_MASK_ALL = 0x1F
}
 

Functions

typedef TYPELIST_5 (GameObject, Player, Creature, Corpse, DynamicObject) AllWorldObjectTypes
 
typedef TYPELIST_4 (GameObject, Creature, DynamicObject, Corpse) AllGridObjectTypes
 
typedef TYPELIST_5 (Creature, GameObject, DynamicObject, Pet, Corpse) AllMapStoredObjectTypes
 
template<uint32 LIMIT>
bool operator== (const CoordPair< LIMIT > &p1, const CoordPair< LIMIT > &p2)
 
template<uint32 LIMIT>
bool operator!= (const CoordPair< LIMIT > &p1, const CoordPair< LIMIT > &p2)
 
template<class RET_TYPE , int CENTER_VAL>
RET_TYPE Acore::Compute (float x, float y, float center_offset, float size)
 
GridCoord Acore::ComputeGridCoord (float x, float y)
 
CellCoord Acore::ComputeCellCoord (float x, float y)
 
CellCoord Acore::ComputeCellCoord (float x, float y, float &x_off, float &y_off)
 
void Acore::NormalizeMapCoord (float &c)
 
bool Acore::IsValidMapCoord (float c)
 
bool Acore::IsValidMapCoord (float x, float y)
 
bool Acore::IsValidMapCoord (float x, float y, float z)
 
bool Acore::IsValidMapCoord (float x, float y, float z, float o)
 

Macro Definition Documentation

◆ CENTER_GRID_CELL_ID

#define CENTER_GRID_CELL_ID   (MAX_NUMBER_OF_CELLS*MAX_NUMBER_OF_GRIDS/2)

◆ CENTER_GRID_CELL_OFFSET

#define CENTER_GRID_CELL_OFFSET   (SIZE_OF_GRID_CELL/2)

◆ CENTER_GRID_ID

#define CENTER_GRID_ID   (MAX_NUMBER_OF_GRIDS/2)

◆ CENTER_GRID_OFFSET

#define CENTER_GRID_OFFSET   (SIZE_OF_GRIDS/2)

◆ MAP_HALFSIZE

#define MAP_HALFSIZE   (MAP_SIZE/2)

◆ MAP_RESOLUTION

#define MAP_RESOLUTION   128

◆ MAP_SIZE

#define MAP_SIZE   (SIZE_OF_GRIDS*MAX_NUMBER_OF_GRIDS)

◆ MAX_NUMBER_OF_CELLS

#define MAX_NUMBER_OF_CELLS   8

◆ MIN_GRID_DELAY

#define MIN_GRID_DELAY   (MINUTE*IN_MILLISECONDS)

◆ MIN_MAP_UPDATE_DELAY

#define MIN_MAP_UPDATE_DELAY   1

◆ SIZE_OF_GRID_CELL

#define SIZE_OF_GRID_CELL   (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS)

◆ TOTAL_NUMBER_OF_CELLS_PER_MAP

#define TOTAL_NUMBER_OF_CELLS_PER_MAP   (MAX_NUMBER_OF_GRIDS*MAX_NUMBER_OF_CELLS)

Typedef Documentation

◆ CellCoord

◆ CorpseMapType

◆ CreatureMapType

◆ DynamicObjectMapType

◆ GameObjectMapType

◆ GridCoord

◆ GridType

typedef Grid<Player, AllWorldObjectTypes, AllGridObjectTypes> GridType

◆ GridTypeMapContainer

typedef TypeMapContainer<AllGridObjectTypes> GridTypeMapContainer

◆ MapStoredObjectTypesContainer

◆ NGridType

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

◆ PlayerMapType

◆ WorldTypeMapContainer

typedef TypeMapContainer<AllWorldObjectTypes> WorldTypeMapContainer

Enumeration Type Documentation

◆ GridMapTypeMask

Enumerator
GRID_MAP_TYPE_MASK_CORPSE 
GRID_MAP_TYPE_MASK_CREATURE 
GRID_MAP_TYPE_MASK_DYNAMICOBJECT 
GRID_MAP_TYPE_MASK_GAMEOBJECT 
GRID_MAP_TYPE_MASK_PLAYER 
GRID_MAP_TYPE_MASK_ALL 
67{
74};
@ GRID_MAP_TYPE_MASK_PLAYER
Definition: GridDefines.h:72
@ GRID_MAP_TYPE_MASK_CREATURE
Definition: GridDefines.h:69
@ GRID_MAP_TYPE_MASK_ALL
Definition: GridDefines.h:73
@ GRID_MAP_TYPE_MASK_GAMEOBJECT
Definition: GridDefines.h:71
@ GRID_MAP_TYPE_MASK_DYNAMICOBJECT
Definition: GridDefines.h:70
@ GRID_MAP_TYPE_MASK_CORPSE
Definition: GridDefines.h:68

Function Documentation

◆ operator!=()

template<uint32 LIMIT>
bool operator!= ( const CoordPair< LIMIT > &  p1,
const CoordPair< LIMIT > &  p2 
)
164{
165 return !(p1 == p2);
166}

◆ operator==()

template<uint32 LIMIT>
bool operator== ( const CoordPair< LIMIT > &  p1,
const CoordPair< LIMIT > &  p2 
)
158{
159 return (p1.x_coord == p2.x_coord && p1.y_coord == p2.y_coord);
160}
uint32 x_coord
Definition: GridDefines.h:152
uint32 y_coord
Definition: GridDefines.h:153

References CoordPair< LIMIT >::x_coord, and CoordPair< LIMIT >::y_coord.

◆ TYPELIST_4()

typedef TYPELIST_4 ( GameObject  ,
Creature  ,
DynamicObject  ,
Corpse   
)

◆ TYPELIST_5() [1/2]

typedef TYPELIST_5 ( Creature  ,
GameObject  ,
DynamicObject  ,
Pet  ,
Corpse   
)

◆ TYPELIST_5() [2/2]

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