00001
00002
00003
00004
00005
00006 #ifndef CAJUN_WAVE_GC_ORACLE_H
00007 #define CAJUN_WAVE_GC_ORACLE_H
00008
00009
00010 #include "gc_oracle.H"
00011 #include "work_list_interface.H"
00012
00013 #include <vector>
00014
00015
00016 namespace cajun
00017 {
00018
00019
00020 class grid_tile_data_t;
00021
00022
00023 class wave_gc_oracle_t : public gc_oracle_t
00024 {
00025 public:
00026 wave_gc_oracle_t (double cell_size_, int neighbor_mode_, work_list_interface_t* work_list_);
00027 ~wave_gc_oracle_t ();
00028
00029 void init (double orient_,
00030 double sx_, double sy_, double gx_, double gy_);
00031
00032 public:
00033
00034
00035
00036
00037 virtual void set_vehicle_position (float vx, float vy);
00038
00039 struct neighbor_t
00040 {
00041 neighbor_t (int dx_, int dy_, float cost_) :
00042 dx (dx_), dy (dy_), cost (cost_) {}
00043
00044 int dx;
00045 int dy;
00046 float cost;
00047
00048 int map_dx;
00049 int map_dy;
00050 };
00051
00052 std::vector<neighbor_t> m_neighbor;
00053 std::vector<neighbor_t> m_goal_neighbor;
00054
00055 work_list_interface_t *m_work_list;
00056 void expand_goal (work_info_t &wi_);
00057
00058 void update (search_grid_t::iterator_t const &dest_iter);
00059 };
00060
00061
00062 };
00063
00064
00065 #endif