23 #ifndef _PLUGINS_COLLI_SEARCH_OBSTACLE_MAP_H_
24 #define _PLUGINS_COLLI_SEARCH_OBSTACLE_MAP_H_
26 #include "../common/types.h"
38 class ColliObstacleMap
47 const std::vector<int>
get_obstacle(
int width,
int height,
bool obstacle_increasement =
true);
50 std::map<unsigned int, ColliFastObstacle *> obstacles_;
61 cell_costs_ = cell_costs;
62 is_rectangle_ = is_rectangle;
71 inline const std::vector<int>
74 unsigned int key = ((
unsigned int)width << 16) | (
unsigned int)height;
76 std::map<unsigned int, ColliFastObstacle *>::iterator p = obstacles_.find(key);
77 if (p == obstacles_.end()) {
83 obstacle =
new ColliFastEllipse(width, height, cell_costs_, obstacle_increasement);
85 obstacles_[key] = obstacle;
90 return obstacles_[key]->get_obstacle();