A DynamicVoronoi object computes and updates a distance map and Voronoi diagram. More...
#include <dynamicvoronoi.h>
Classes | |
| struct | dataCell |
Public Member Functions | |
| void | initializeEmpty (int _sizeX, int _sizeY, bool initGridMap=true) |
| Initialization with an empty map. | |
| void | initializeMap (int _sizeX, int _sizeY, bool **_gridMap) |
| Initialization with a given binary map (false==free, true==occupied) | |
| void | occupyCell (int x, int y) |
| add an obstacle at the specified cell coordinate | |
| void | clearCell (int x, int y) |
| remove an obstacle at the specified cell coordinate | |
| void | exchangeObstacles (std::vector< INTPOINT > newObstacles) |
| remove old dynamic obstacles and add the new ones | |
| void | update (bool updateRealDist=true) |
| update distance map and Voronoi diagram to reflect the changes | |
| void | prune () |
| prune the Voronoi diagram | |
| float | getDistance (int x, int y) |
| returns the obstacle distance at the specified location | |
| bool | isVoronoi (int x, int y) |
| returns whether the specified cell is part of the (pruned) Voronoi graph | |
| bool | isOccupied (int x, int y) |
| checks whether the specficied location is occupied | |
| void | visualize (const char *filename="result.ppm") |
| write the current distance map and voronoi diagram as ppm file | |
| unsigned int | getSizeX () |
| returns the horizontal size of the workspace/map | |
| unsigned int | getSizeY () |
| returns the vertical size of the workspace/map | |
| void | setObstacle (int x, int y) |
| void | removeObstacle (int x, int y) |
| void | checkVoro (int x, int y, int nx, int ny, dataCell &c, dataCell &nc) |
| void | recheckVoro () |
| void | commitAndColorize (bool updateRealDist=true) |
| void | reviveVoroNeighbors (int &x, int &y) |
| bool | isOccupied (int &x, int &y, dataCell &c) |
| markerMatchResult | markerMatch (int x, int y) |
Public Attributes | |
| BucketPrioQueue | open |
| std::queue< INTPOINT > | pruneQueue |
| std::vector< INTPOINT > | removeList |
| std::vector< INTPOINT > | addList |
| std::vector< INTPOINT > | lastObstacles |
| int | sizeY |
| int | sizeX |
| dataCell ** | data |
| bool ** | gridMap |
| int | padding |
| double | doubleThreshold |
| double | sqrt2 |
A DynamicVoronoi object computes and updates a distance map and Voronoi diagram.
1.8.6