HOG2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GridData Class Reference

#include <Map3DGrid.h>

Public Member Functions

 GridData ()
 
 GridData (const GridData &copy_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
 

Detailed Description

Definition at line 47 of file Map3DGrid.h.

Constructor & Destructor Documentation

◆ GridData() [1/2]

GridData::GridData ( )
inline

Definition at line 49 of file Map3DGrid.h.

References gSectorSize, and points.

◆ GridData() [2/2]

GridData::GridData ( const GridData copy_from_me)
inline

Definition at line 55 of file Map3DGrid.h.

References gSectorSize, and points.

◆ ~GridData()

GridData::~GridData ( )
inline

Definition at line 61 of file Map3DGrid.h.

References points.

Member Function Documentation

◆ AddBlocked()

void GridData::AddBlocked ( int  x,
int  y 
)

Definition at line 149 of file Map3DGrid.cpp.

References indexFromXY(), and points.

◆ AddIntraRegionEdges()

void GridData::AddIntraRegionEdges ( int  xRegLoc,
int  yRegLoc 
)
private

◆ AddMove() [1/2]

int GridData::AddMove ( unsigned  index,
moveDir  dir,
bool  local 
)

Definition at line 23 of file Map3DGrid.cpp.

References gSectorSize, and points.

◆ AddMove() [2/2]

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.

◆ AddPoint()

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().

◆ BFS()

int GridData::BFS ( std::vector< int > &  labels,
int  offset,
int  label 
)
private

Definition at line 184 of file Map3DGrid.cpp.

References GetHeightOffset(), gSectorSize, and height.

Referenced by LabelAreas().

◆ CanPass()

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().

◆ ClearMoves()

void GridData::ClearMoves ( int  x,
int  y 
)

Definition at line 87 of file Map3DGrid.cpp.

References indexFromXY(), and points.

◆ GetBlocked()

int GridData::GetBlocked ( int  x,
int  y 
)

Definition at line 144 of file Map3DGrid.cpp.

References indexFromXY(), and points.

◆ GetHeightOffset() [1/2]

int GridData::GetHeightOffset ( int  offset) const

Definition at line 118 of file Map3DGrid.cpp.

References points.

◆ GetHeightOffset() [2/2]

int GridData::GetHeightOffset ( unsigned int  x,
unsigned int  y 
) const

◆ GetMoveLocality() [1/2]

uint8_t GridData::GetMoveLocality ( int  offset) const

Definition at line 81 of file Map3DGrid.cpp.

References points.

◆ GetMoveLocality() [2/2]

uint8_t GridData::GetMoveLocality ( int  x,
int  y 
) const

Definition at line 76 of file Map3DGrid.cpp.

References indexFromXY(), and points.

◆ GetMoves() [1/2]

uint8_t GridData::GetMoves ( int  offset) const

Definition at line 71 of file Map3DGrid.cpp.

References points.

◆ GetMoves() [2/2]

uint8_t GridData::GetMoves ( int  x,
int  y 
) const

Definition at line 66 of file Map3DGrid.cpp.

References indexFromXY(), and points.

◆ IsPointPassable()

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().

◆ LabelAreas()

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.

◆ ReMove() [1/2]

int GridData::ReMove ( unsigned  index,
moveDir  dir 
)

Definition at line 48 of file Map3DGrid.cpp.

References gSectorSize, and points.

◆ ReMove() [2/2]

void GridData::ReMove ( unsigned int  x,
unsigned int  y,
moveDir  dir 
)

Definition at line 58 of file Map3DGrid.cpp.

References gSectorSize, indexFromXY(), and points.

◆ RemoveIntraRegionEdges()

void GridData::RemoveIntraRegionEdges ( int  xRegLoc,
int  yRegLoc 
)
private

◆ RemovePoint()

void GridData::RemovePoint ( int  x,
int  y 
)

Definition at line 98 of file Map3DGrid.cpp.

References indexFromXY(), kUnpassableHeight, and points.

◆ SetHeightOffset() [1/2]

void GridData::SetHeightOffset ( int  offset,
int  height 
)

Definition at line 130 of file Map3DGrid.cpp.

References height, and points.

◆ SetHeightOffset() [2/2]

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().

◆ SubtractBlocked()

void GridData::SubtractBlocked ( int  x,
int  y 
)

Definition at line 156 of file Map3DGrid.cpp.

References indexFromXY(), and points.

Member Data Documentation

◆ points

uint32_t* GridData::points
private

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