HOG2
|
#include <Map3DGrid.h>
Public Member Functions | |
GridData () | |
GridData (const GridData ©_from_me) | |
~GridData () | |
int | AddMove (unsigned index, moveDir dir, bool local) |
void | AddMove (unsigned int x, unsigned int y, moveDir dir, bool local) |
int | ReMove (unsigned index, moveDir dir) |
void | ReMove (unsigned int x, unsigned int y, moveDir dir) |
uint8_t | GetMoves (int x, int y) const |
uint8_t | GetMoves (int offset) const |
uint8_t | GetMoveLocality (int x, int y) const |
uint8_t | GetMoveLocality (int offset) const |
void | ClearMoves (int x, int y) |
int | GetHeightOffset (unsigned int x, unsigned int y) const |
int | GetHeightOffset (int offset) const |
void | SetHeightOffset (int x, int y, int height) |
void | SetHeightOffset (int offset, int height) |
bool | AddPoint (int x, int y, int height) |
void | RemovePoint (int x, int y) |
bool | IsPointPassable (unsigned int x, unsigned int y) const |
bool | CanPass (unsigned int x, unsigned int y, int offsetx, int offsety) const |
int | GetBlocked (int x, int y) |
void | AddBlocked (int x, int y) |
void | SubtractBlocked (int x, int y) |
int | LabelAreas (std::vector< int > &labels, std::vector< int > &counts, std::vector< int > &heights) |
Private Member Functions | |
int | BFS (std::vector< int > &labels, int offset, int label) |
void | AddIntraRegionEdges (int xRegLoc, int yRegLoc) |
void | RemoveIntraRegionEdges (int xRegLoc, int yRegLoc) |
Private Attributes | |
uint32_t * | points |
Definition at line 47 of file Map3DGrid.h.
|
inline |
Definition at line 49 of file Map3DGrid.h.
References gSectorSize, and points.
|
inline |
Definition at line 55 of file Map3DGrid.h.
References gSectorSize, and points.
|
inline |
Definition at line 61 of file Map3DGrid.h.
References points.
void GridData::AddBlocked | ( | int | x, |
int | y | ||
) |
Definition at line 149 of file Map3DGrid.cpp.
References indexFromXY(), and points.
|
private |
int GridData::AddMove | ( | unsigned | index, |
moveDir | dir, | ||
bool | local | ||
) |
Definition at line 23 of file Map3DGrid.cpp.
References gSectorSize, and points.
void GridData::AddMove | ( | unsigned int | x, |
unsigned int | y, | ||
moveDir | dir, | ||
bool | local | ||
) |
Definition at line 38 of file Map3DGrid.cpp.
References indexFromXY(), and points.
bool GridData::AddPoint | ( | int | x, |
int | y, | ||
int | height | ||
) |
Definition at line 92 of file Map3DGrid.cpp.
References height, and SetHeightOffset().
Referenced by RegionData::AddPoint().
|
private |
Definition at line 184 of file Map3DGrid.cpp.
References GetHeightOffset(), gSectorSize, and height.
Referenced by LabelAreas().
bool GridData::CanPass | ( | unsigned int | x, |
unsigned int | y, | ||
int | offsetx, | ||
int | offsety | ||
) | const |
Definition at line 111 of file Map3DGrid.cpp.
References GetHeightOffset(), and IsPointPassable().
void GridData::ClearMoves | ( | int | x, |
int | y | ||
) |
Definition at line 87 of file Map3DGrid.cpp.
References indexFromXY(), and points.
int GridData::GetBlocked | ( | int | x, |
int | y | ||
) |
Definition at line 144 of file Map3DGrid.cpp.
References indexFromXY(), and points.
int GridData::GetHeightOffset | ( | int | offset | ) | const |
Definition at line 118 of file Map3DGrid.cpp.
References points.
int GridData::GetHeightOffset | ( | unsigned int | x, |
unsigned int | y | ||
) | const |
Definition at line 123 of file Map3DGrid.cpp.
References gSectorSize, indexFromXY(), and points.
Referenced by BFS(), RegionData::CanAddPoint(), CanPass(), LabelAreas(), RegionData::LowerBase(), and RegionData::RedoCenterLocation().
uint8_t GridData::GetMoveLocality | ( | int | offset | ) | const |
Definition at line 81 of file Map3DGrid.cpp.
References points.
uint8_t GridData::GetMoveLocality | ( | int | x, |
int | y | ||
) | const |
Definition at line 76 of file Map3DGrid.cpp.
References indexFromXY(), and points.
uint8_t GridData::GetMoves | ( | int | offset | ) | const |
Definition at line 71 of file Map3DGrid.cpp.
References points.
uint8_t GridData::GetMoves | ( | int | x, |
int | y | ||
) | const |
Definition at line 66 of file Map3DGrid.cpp.
References indexFromXY(), and points.
bool GridData::IsPointPassable | ( | unsigned int | x, |
unsigned int | y | ||
) | const |
Definition at line 104 of file Map3DGrid.cpp.
References gSectorSize, indexFromXY(), kUnpassableHeight, and points.
Referenced by RegionData::CanAddPoint(), and CanPass().
int GridData::LabelAreas | ( | std::vector< int > & | labels, |
std::vector< int > & | counts, | ||
std::vector< int > & | heights | ||
) |
Definition at line 163 of file Map3DGrid.cpp.
References BFS(), GetHeightOffset(), gSectorSize, height, and kUnpassableHeight.
int GridData::ReMove | ( | unsigned | index, |
moveDir | dir | ||
) |
Definition at line 48 of file Map3DGrid.cpp.
References gSectorSize, and points.
void GridData::ReMove | ( | unsigned int | x, |
unsigned int | y, | ||
moveDir | dir | ||
) |
Definition at line 58 of file Map3DGrid.cpp.
References gSectorSize, indexFromXY(), and points.
|
private |
void GridData::RemovePoint | ( | int | x, |
int | y | ||
) |
Definition at line 98 of file Map3DGrid.cpp.
References indexFromXY(), kUnpassableHeight, and points.
void GridData::SetHeightOffset | ( | int | offset, |
int | height | ||
) |
Definition at line 130 of file Map3DGrid.cpp.
void GridData::SetHeightOffset | ( | int | x, |
int | y, | ||
int | height | ||
) |
Definition at line 137 of file Map3DGrid.cpp.
References height, indexFromXY(), and points.
Referenced by AddPoint(), and RegionData::LowerBase().
void GridData::SubtractBlocked | ( | int | x, |
int | y | ||
) |
Definition at line 156 of file Map3DGrid.cpp.
References indexFromXY(), and points.
|
private |
Definition at line 89 of file Map3DGrid.h.
Referenced by AddBlocked(), AddMove(), ClearMoves(), GetBlocked(), GetHeightOffset(), GetMoveLocality(), GetMoves(), GridData(), IsPointPassable(), ReMove(), RemovePoint(), SetHeightOffset(), SubtractBlocked(), and ~GridData().