Go to the documentation of this file.00001
00012 #ifndef LGL_COST_MANAGER_HPP
00013 #define LGL_COST_MANAGER_HPP
00014
00015 #include <lgl/GeoData.hpp>
00016 #include <lgl/Quadtree.hpp>
00017 #include <lgl/PositionManager.hpp>
00018
00019 #include <lgl/NavHeuDistances.hpp>
00020 #include <lgl/NavGNode.hpp>
00021 #include <lgl/Attributes.hpp>
00022
00023 namespace jafar {
00024 namespace lgl {
00025
00032 class CostManager {
00033
00034 public:
00035
00037 enum DIST_TYPE {EUCLIDEAN=0, MANHATTAN};
00038
00039 CostManager(GeoData* _geodata, Quadtree<double,GeoData>* _quadtree, PositionManager* _posManager, DIST_TYPE _distType=EUCLIDEAN);
00040 ~CostManager();
00041
00047 void setDistType(DIST_TYPE _distType);
00048
00054 void setObstacleLimit(double pol);
00055
00062 bool weight(RasterCellIndex locClusterRootIndex, const NavLocation& loc1, const NavLocation& loc2, double& weight);
00063
00065 bool weight(const NavLocation& loc1, const NavLocation& loc2, double& weight);
00066
00068 bool weight(const NavLocation& loc1, const NavLocation& loc2, double costAtLoc2, double& weight);
00069
00070 protected:
00071
00073 GeoData* geodata;
00074
00076 PositionManager* posManager;
00077
00079 Quadtree<double,GeoData>* quadtree;
00080
00085 DIST_TYPE distType;
00086
00088 double obstacleLimit;
00089
00090
00091 };
00092 }
00093 }
00094
00095 #endif