#include <Cell.h>
|
| Cell () |
|
| Cell (Cell const &cell) |
|
| Cell (CellCoord const &p) |
|
| Cell (float x, float y) |
|
void | Compute (uint32 &x, uint32 &y) const |
|
bool | DiffCell (const Cell &cell) const |
|
bool | DiffGrid (const Cell &cell) const |
|
uint32 | CellX () const |
|
uint32 | CellY () const |
|
uint32 | GridX () const |
|
uint32 | GridY () const |
|
bool | NoCreate () const |
|
void | SetNoCreate () |
|
CellCoord | GetCellCoord () const |
|
Cell & | operator= (Cell const &cell) |
|
bool | operator== (Cell const &cell) const |
|
bool | operator!= (Cell const &cell) const |
|
template<class T , class CONTAINER > |
void | Visit (CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, WorldObject const &, float) const |
|
template<class T , class CONTAINER > |
void | Visit (CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, float, float, float) const |
|
52 {
data.All = cell.data.All; }
34 data.Part.nocreate = 0;
35 data.Part.reserved = 0;
#define MAX_NUMBER_OF_CELLS
Definition: GridDefines.h:35
Cell::Cell |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlineexplicit |
45 data.Part.nocreate = 0;
46 data.Part.reserved = 0;
#define MAX_NUMBER_OF_CELLS
Definition: GridDefines.h:35
CellCoord ComputeCellCoord(float x, float y)
Definition: GridDefines.h:193
uint32 y_coord
Definition: GridDefines.h:156
uint32 x_coord
Definition: GridDefines.h:155
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37
CellArea Cell::CalculateCellArea |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
radius |
|
) |
| |
|
inlinestatic |
CoordPair & normalize()
Definition: GridDefines.h:143
CellCoord ComputeCellCoord(float x, float y)
Definition: GridDefines.h:193
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37
74 {
return data.Part.cell_x; }
75 {
return data.Part.cell_y; }
#define MAX_NUMBER_OF_CELLS
Definition: GridDefines.h:35
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37
struct Cell::@307::@308 Part
struct Cell::@307::@308 Part
#define MAX_NUMBER_OF_CELLS
Definition: GridDefines.h:35
CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAP > CellCoord
Definition: GridDefines.h:172
76 {
return data.Part.grid_x; }
77 {
return data.Part.grid_y; }
bool Cell::NoCreate |
( |
| ) |
const |
|
inline |
78 {
return data.Part.nocreate; }
bool operator==(Cell const &cell) const
Definition: Cell.h:94
90 this->
data.All = cell.data.All;
94 {
return (
data.All == cell.data.All); }
void Cell::SetNoCreate |
( |
| ) |
|
|
inline |
79 {
data.Part.nocreate = 1; }
template<class T , class CONTAINER >
126 Visit(standing_cell, visitor, map, radius + obj.GetObjectSize(), obj.GetPositionX(), obj.GetPositionY());
void Visit(CellCoord const &, TypeContainerVisitor< T, CONTAINER > &visitor, Map &, WorldObject const &, float) const
Definition: CellImpl.h:122
template<class T , class CONTAINER >
66 if (!standing_cell.IsCoordValid())
74 map.
Visit(*
this, visitor);
86 map.
Visit(*
this, visitor);
102 map.
Visit(*
this, visitor);
111 if (cellCoord != standing_cell)
113 Cell r_zone(cellCoord);
114 r_zone.data.Part.nocreate = this->
data.Part.nocreate;
115 map.
Visit(r_zone, visitor);
#define SIZE_OF_GRIDS
Definition: GridDefines.h:39
uint32 y_coord
Definition: GridDefines.h:156
static CellArea CalculateCellArea(float x, float y, float radius)
Definition: CellImpl.h:49
uint32 x_coord
Definition: GridDefines.h:155
CellCoord low_bound
Definition: Cell.h:45
uint32_t uint32
Definition: Define.h:150
G3D::int16 y
Definition: Vector2int16.h:38
void VisitCircle(TypeContainerVisitor< T, CONTAINER > &, Map &, CellCoord const &, CellCoord const &) const
Definition: CellImpl.h:130
void Visit(const Cell &cell, TypeContainerVisitor< T, CONTAINER > &visitor)
Definition: Map.h:811
CellCoord high_bound
Definition: Cell.h:46
G3D::int16 x
Definition: Vector2int16.h:37
template<class T , class CONTAINER >
133 uint32 x_shift = (
uint32)ceilf((end_cell.x_coord - begin_cell.x_coord) * 0.3f - 0.5f);
135 const uint32 x_start = begin_cell.x_coord + x_shift;
136 const uint32 x_end = end_cell.x_coord - x_shift;
139 for (
uint32 x = x_start;
x <= x_end; ++
x)
141 for (
uint32 y = begin_cell.y_coord;
y <= end_cell.y_coord; ++
y)
144 Cell r_zone(cellCoord);
145 r_zone.data.Part.nocreate = this->
data.Part.nocreate;
146 map.
Visit(r_zone, visitor);
155 uint32 y_start = end_cell.y_coord;
156 uint32 y_end = begin_cell.y_coord;
158 for (
uint32 step = 1; step <= (x_start - begin_cell.x_coord); ++step)
163 for (
uint32 y = y_start;
y >= y_end; --
y)
168 Cell r_zone_left(cellCoord_left);
169 r_zone_left.data.Part.nocreate = this->
data.Part.nocreate;
170 map.
Visit(r_zone_left, visitor);
174 Cell r_zone_right(cellCoord_right);
175 r_zone_right.data.Part.nocreate = this->
data.Part.nocreate;
176 map.
Visit(r_zone_right, visitor);
uint32_t uint32
Definition: Define.h:150
G3D::int16 y
Definition: Vector2int16.h:38
void Visit(const Cell &cell, TypeContainerVisitor< T, CONTAINER > &visitor)
Definition: Map.h:811
uint32_t uint32
Definition: g3dmath.h:168
G3D::int16 x
Definition: Vector2int16.h:37
struct { ... } Cell::Part |
float Cell::v8[16 *8][16 *8] |
float Cell::v9[16 *8+1][16 *8+1] |
The documentation for this struct was generated from the following files: