TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
RegularGrid2D< T, Node, NodeCreatorFunc, PositionFunc >::Cell Struct Reference

#include <RegularGrid.h>

Public Member Functions

bool operator== (const Cell &c2) const
 
bool isValid () const
 

Static Public Member Functions

static Cell ComputeCell (float fx, float fy)
 

Public Attributes

int x
 
int y
 

Member Function Documentation

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class PositionFunc = PositionTrait<T>>
static Cell RegularGrid2D< T, Node, NodeCreatorFunc, PositionFunc >::Cell::ComputeCell ( float  fx,
float  fy 
)
inlinestatic
82  {
83  Cell c = { int(fx * (1.f/CELL_SIZE) + (CELL_NUMBER/2)), int(fy * (1.f/CELL_SIZE) + (CELL_NUMBER/2)) };
84  return c;
85  }
#define CELL_SIZE
Definition: RegularGrid.h:32
Definition: Cell.h:49
Definition: RegularGrid.h:28
template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class PositionFunc = PositionTrait<T>>
bool RegularGrid2D< T, Node, NodeCreatorFunc, PositionFunc >::Cell::isValid ( ) const
inline
87 { return x >= 0 && x < CELL_NUMBER && y >= 0 && y < CELL_NUMBER;}
int y
Definition: RegularGrid.h:78
int x
Definition: RegularGrid.h:78
Definition: RegularGrid.h:28

+ Here is the caller graph for this function:

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class PositionFunc = PositionTrait<T>>
bool RegularGrid2D< T, Node, NodeCreatorFunc, PositionFunc >::Cell::operator== ( const Cell c2) const
inline
79 { return x == c2.x && y == c2.y;}
int y
Definition: RegularGrid.h:78
int x
Definition: RegularGrid.h:78

Member Data Documentation

template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class PositionFunc = PositionTrait<T>>
int RegularGrid2D< T, Node, NodeCreatorFunc, PositionFunc >::Cell::x
template<class T , class Node , class NodeCreatorFunc = NodeCreator<Node>, class PositionFunc = PositionTrait<T>>
int RegularGrid2D< T, Node, NodeCreatorFunc, PositionFunc >::Cell::y

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