Jafar
|
Class that take care position management its algorithms reason over position instead of raster cells or clusters. More...
Class that take care position management its algorithms reason over position instead of raster cells or clusters.
Definition at line 40 of file PositionManager.hpp.
#include <PositionManager.hpp>
Public Member Functions | |
PositionManager (GeoData *_geodata, jafar::lgl::Quadtree< double, GeoData > *_qtree) | |
Constructor for the position Manager. | |
bool | isAtCenter (const NavLocation &loc) const |
bool | isAtEdge (const NavLocation &loc) const |
bool | isAtBorder (const NavLocation &loc) const |
bool | getGEnterPos (const NavLocation &loc, std::vector< NavLocation > &enterLocs) const |
Get the enter positions to the nav graph of a given position inside the position map with the decomposition decomp. | |
bool | getAdjRasterCells (const NavLocation &loc, std::vector< RasterCellIndex > &cells) const |
bool | getAdjClusters (const NavLocation &loc, std::vector< RasterCellIndex > &clusters) const |
bool | getTopLeftRasterCell (const NavLocation &loc, RasterCellIndex &cell) |
bool | getTopLeftCluster (const NavLocation &loc, RasterCellIndex &cell) |
bool | inSameCluster (const NavLocation &loc1, const NavLocation &loc2, RasterCellIndex &clusterRoot) |
bool | getCluster (const NavLocation &loc1, const NavLocation &loc2, RasterRect &cluster) |
Return the cluster in which lays the edge between loc1 and loc2. | |
bool | getCluster (const NavLocation &loc1, const NavLocation &loc2, DecompCluster **cluster) |
Return the decomp cluster in which lays the edge between loc1 and loc2. | |
bool | getCluster (const RasterCellIndex &clusterRoot, DecompCluster **cluster) |
bool | getClusterUnordered (const NavLocation &loc, DecompCluster **cluster) |
Returns the decomposition cluster for one location. | |
Protected Attributes | |
RasterRect | rect |
Main map borders, main global rectangle, everything-container in terms of position indexes. | |
PosMap | pos |
GeoData * | geodata |
Quadtree< double, GeoData > * | quadtree |
Private Types | |
typedef FlexGrid< PosFeature > | PosMap |
jafar::lgl::PositionManager::PositionManager | ( | GeoData * | _geodata, |
jafar::lgl::Quadtree< double, GeoData > * | _qtree | ||
) |
Constructor for the position Manager.
bool jafar::lgl::PositionManager::getCluster | ( | const NavLocation & | loc1, |
const NavLocation & | loc2, | ||
RasterRect & | cluster | ||
) |
Return the cluster in which lays the edge between loc1 and loc2.
This cluster is represented by a rectangle zone on which borders lay the two locations.
loc1 | Source position of the edge we are looking for |
loc2 | Target position of the edge we are looking for |
cluster | output of this function, the corresponding raster rectangle |
bool jafar::lgl::PositionManager::getCluster | ( | const NavLocation & | loc1, |
const NavLocation & | loc2, | ||
DecompCluster ** | cluster | ||
) |
Return the decomp cluster in which lays the edge between loc1 and loc2.
This cluster is a leaf of the quadtree decomposition structure. Data can be updated directly inside.
loc1 | Source position of the edge we are looking for |
loc2 | Target position of the edge we are looking for |
cluster | output of this function, the pointer to the corresponding DecompCluster |
bool jafar::lgl::PositionManager::getClusterUnordered | ( | const NavLocation & | loc, |
DecompCluster ** | cluster | ||
) |
Returns the decomposition cluster for one location.
This function should not be used to try to build edges. It is only intended for information pulling. In the returned decomposition cluster the user can find the associated terrain state but it is not garanteed on which side of the location the information is pulled as it depends on how the land decomposition
bool jafar::lgl::PositionManager::getGEnterPos | ( | const NavLocation & | loc, |
std::vector< NavLocation > & | enterLocs | ||
) | const |
Get the enter positions to the nav graph of a given position inside the position map with the decomposition decomp.
if this position is already inside the graph then do nothing
Generated on Wed Oct 15 2014 00:37:41 for Jafar by doxygen 1.7.6.1 |