TrinityCore
Cell Struct Reference

#include <Cell.h>

Public Member Functions

 Cell ()
 
 Cell (Cell const &cell)
 
 Cell (CellCoord const &p)
 
 Cell (float x, float y)
 
void Compute (uint32 &x, uint32 &y) const
 
bool DiffCell (Cell const &cell) const
 
bool DiffGrid (Cell const &cell) const
 
uint32 CellX () const
 
uint32 CellY () const
 
uint32 GridX () const
 
uint32 GridY () const
 
bool NoCreate () const
 
void SetNoCreate ()
 
CellCoord GetCellCoord () const
 
Celloperator= (Cell const &cell)
 
bool operator== (Cell const &cell) const
 
template<class T , class CONTAINER >
void Visit (CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, WorldObject const &obj, float radius) const
 
template<class T , class CONTAINER >
void Visit (CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, float x, float y, float radius) const
 

Static Public Member Functions

static CellArea CalculateCellArea (float x, float y, float radius)
 
template<class T >
static void VisitGridObjects (WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
 
template<class T >
static void VisitWorldObjects (WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
 
template<class T >
static void VisitAllObjects (WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
 
template<class T >
static void VisitGridObjects (float x, float y, Map *map, T &visitor, float radius, bool dont_load=true)
 
template<class T >
static void VisitWorldObjects (float x, float y, Map *map, T &visitor, float radius, bool dont_load=true)
 
template<class T >
static void VisitAllObjects (float x, float y, Map *map, T &visitor, float radius, bool dont_load=true)
 

Public Attributes

union {
   struct {
      unsigned   grid_x: 6
 
      unsigned   grid_y: 6
 
      unsigned   cell_x: 6
 
      unsigned   cell_y: 6
 
      unsigned   nocreate: 1
 
      unsigned   reserved: 7
 
   }   Part
 
   uint32   All
 
data
 

Private Member Functions

template<class T , class CONTAINER >
void VisitCircle (TypeContainerVisitor< T, CONTAINER > &, Map &, CellCoord const &, CellCoord const &) const
 

Detailed Description

Definition at line 46 of file Cell.h.

Constructor & Destructor Documentation

◆ Cell() [1/4]

Cell::Cell ( )
inline

Definition at line 48 of file Cell.h.

◆ Cell() [2/4]

Cell::Cell ( Cell const &  cell)
inline

Definition at line 49 of file Cell.h.

◆ Cell() [3/4]

Cell::Cell ( CellCoord const &  p)
inlineexplicit

Definition at line 25 of file CellImpl.h.

◆ Cell() [4/4]

Cell::Cell ( float  x,
float  y 
)
inlineexplicit

Definition at line 35 of file CellImpl.h.

+ Here is the call graph for this function:

Member Function Documentation

◆ CalculateCellArea()

CellArea Cell::CalculateCellArea ( float  x,
float  y,
float  radius 
)
inlinestatic

Definition at line 46 of file CellImpl.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CellX()

uint32 Cell::CellX ( ) const
inline

Definition at line 71 of file Cell.h.

+ Here is the caller graph for this function:

◆ CellY()

uint32 Cell::CellY ( ) const
inline

Definition at line 72 of file Cell.h.

+ Here is the caller graph for this function:

◆ Compute()

void Cell::Compute ( uint32 x,
uint32 y 
) const
inline

Definition at line 53 of file Cell.h.

◆ DiffCell()

bool Cell::DiffCell ( Cell const &  cell) const
inline

Definition at line 59 of file Cell.h.

+ Here is the caller graph for this function:

◆ DiffGrid()

bool Cell::DiffGrid ( Cell const &  cell) const
inline

Definition at line 65 of file Cell.h.

+ Here is the caller graph for this function:

◆ GetCellCoord()

CellCoord Cell::GetCellCoord ( ) const
inline

Definition at line 78 of file Cell.h.

+ Here is the caller graph for this function:

◆ GridX()

uint32 Cell::GridX ( ) const
inline

Definition at line 73 of file Cell.h.

+ Here is the caller graph for this function:

◆ GridY()

uint32 Cell::GridY ( ) const
inline

Definition at line 74 of file Cell.h.

+ Here is the caller graph for this function:

◆ NoCreate()

bool Cell::NoCreate ( ) const
inline

Definition at line 75 of file Cell.h.

+ Here is the caller graph for this function:

◆ operator=()

Cell & Cell::operator= ( Cell const &  cell)
inline

Definition at line 85 of file Cell.h.

◆ operator==()

bool Cell::operator== ( Cell const &  cell) const
inline

Definition at line 91 of file Cell.h.

◆ SetNoCreate()

void Cell::SetNoCreate ( )
inline

Definition at line 76 of file Cell.h.

+ Here is the caller graph for this function:

◆ Visit() [1/2]

template<class T , class CONTAINER >
void Cell::Visit ( CellCoord const &  standing_cell,
TypeContainerVisitor< T, CONTAINER > &  visitor,
Map map,
float  x,
float  y,
float  radius 
) const
inline

Definition at line 69 of file CellImpl.h.

+ Here is the call graph for this function:

◆ Visit() [2/2]

template<class T , class CONTAINER >
void Cell::Visit ( CellCoord const &  standing_cell,
TypeContainerVisitor< T, CONTAINER > &  visitor,
Map map,
WorldObject const &  obj,
float  radius 
) const
inline

Definition at line 61 of file CellImpl.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VisitAllObjects() [1/2]

template<class T >
void Cell::VisitAllObjects ( float  x,
float  y,
Map map,
T &  visitor,
float  radius,
bool  dont_load = true 
)
inlinestatic

Definition at line 241 of file CellImpl.h.

+ Here is the call graph for this function:

◆ VisitAllObjects() [2/2]

template<class T >
void Cell::VisitAllObjects ( WorldObject const *  obj,
T &  visitor,
float  radius,
bool  dont_load = true 
)
inlinestatic

Definition at line 203 of file CellImpl.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VisitCircle()

template<class T , class CONTAINER >
void Cell::VisitCircle ( TypeContainerVisitor< T, CONTAINER > &  visitor,
Map map,
CellCoord const &  begin_cell,
CellCoord const &  end_cell 
) const
inlineprivate

Definition at line 127 of file CellImpl.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VisitGridObjects() [1/2]

template<class T >
void Cell::VisitGridObjects ( float  x,
float  y,
Map map,
T &  visitor,
float  radius,
bool  dont_load = true 
)
inlinestatic

Definition at line 217 of file CellImpl.h.

+ Here is the call graph for this function:

◆ VisitGridObjects() [2/2]

template<class T >
void Cell::VisitGridObjects ( WorldObject const *  obj,
T &  visitor,
float  radius,
bool  dont_load = true 
)
inlinestatic

Definition at line 179 of file CellImpl.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VisitWorldObjects() [1/2]

template<class T >
void Cell::VisitWorldObjects ( float  x,
float  y,
Map map,
T &  visitor,
float  radius,
bool  dont_load = true 
)
inlinestatic

Definition at line 229 of file CellImpl.h.

+ Here is the call graph for this function:

◆ VisitWorldObjects() [2/2]

template<class T >
void Cell::VisitWorldObjects ( WorldObject const *  obj,
T &  visitor,
float  radius,
bool  dont_load = true 
)
inlinestatic

Definition at line 191 of file CellImpl.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ All

uint32 Cell::All

Definition at line 103 of file Cell.h.

◆ cell_x

unsigned Cell::cell_x

Definition at line 98 of file Cell.h.

◆ cell_y

unsigned Cell::cell_y

Definition at line 99 of file Cell.h.

◆ 

union { ... } Cell::data

◆ grid_x

unsigned Cell::grid_x

Definition at line 96 of file Cell.h.

◆ grid_y

unsigned Cell::grid_y

Definition at line 97 of file Cell.h.

◆ nocreate

unsigned Cell::nocreate

Definition at line 100 of file Cell.h.

◆ 

struct { ... } Cell::Part

◆ reserved

unsigned Cell::reserved

Definition at line 101 of file Cell.h.


The documentation for this struct was generated from the following files: