00001
00002
00003
00004 #ifndef CAJUN_WALL_H
00005 #define CAJUN_WALL_H
00006
00007 #include "data_type.H"
00008 #include "stripe.H"
00009
00010 #define FORWARD 0 // indexes for m_strips
00011 #define REVERSE 1
00012
00013 namespace cajun
00014 {
00015 class wall_t
00016 {
00017 public:
00018 wall_t (double orient_, double ref_x_, double ref_y_, double ref_z_);
00019
00020 void update_ref_pos (motion_data_t motion_, nav_data_t nav_);
00021 void fill_wall (const scan_gp_data_t &scan_gp, unsigned counter);
00022 void fill_wall (const survey_gp_data_t &scan_gp, unsigned counter);
00023
00024 unsigned max_columns ();
00025 unsigned max_cells (unsigned strip_);
00026 const cell_t& cell (unsigned r, unsigned c) const;
00027 cell_t& cell (unsigned r, unsigned c);
00028
00029 void get_ref_pos (double &x_, double &y_) const;
00030
00031 bool global_stripe_pos (unsigned strip_id, unsigned cell_id_,
00032 double &x_, double &y_) const;
00033
00034 stripe_t& stripe (unsigned index_);
00035
00036 void sort_stripe (unsigned strip_id);
00037 unsigned stripe_counter (unsigned strip_id);
00038 void flush_stripe (unsigned strip_id);
00039
00040 void print ();
00041
00042
00043 private:
00044 double m_orient;
00045 double m_ref_x;
00046 double m_ref_y;
00047 double m_ref_z;
00048 double m_ground_z;
00049 double m_dis_hopped;
00050
00051 double m_cell_size;
00052
00053
00054
00055 std::vector<stripe_t*> m_strips[2];
00056 bool strip_for_pt (double x, double y, double z,
00057 unsigned &strip_set_id, unsigned &strip_id);
00058
00059 };
00060
00061
00062
00063 };
00064
00065 #endif