Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Stereosimu.hpp
00001 
00002 #ifndef _JAFAR_STEREOSIMU_STEREOSIMU_HPP_
00003 #define _JAFAR_STEREOSIMU_STEREOSIMU_HPP_
00004 
00005 #include "dtm/Dtm.hpp"
00006 #include "geom/t3dEuler.hpp"
00007 #include "calife/Image3d.hpp"
00008 
00009 #include <string>
00010 #include <vector>
00011 
00012 namespace jafar {
00013   namespace stereosimu {
00014 
00019     struct CosSin {
00020       double _angle; 
00021       double _cos;  
00022       double _sin;  
00024       CosSin() {};
00025       CosSin(double ang, double cos, double sin): _angle(ang) ,_cos(cos), _sin(sin) {};
00026       ~CosSin() {};
00027     };
00028 
00034     struct Point {
00035       double x;
00036       double y;
00037       double z;
00038 
00039       Point() {};
00040       Point(double _x, double _y, double _z): x(_x), y(_y), z(_z) {};
00041       ~Point() {};
00042 
00048       void change_frame(jafar::geom::T3D& t3d);
00049 
00053       friend std::ostream& operator << (std::ostream& o , const Point& p);
00054     };
00055 
00065     class Stereosimu {
00066       public:
00074         Stereosimu(jafar::geom::T3D& s2m, double delta_angle, double angle, double max);
00075 
00079         ~Stereosimu();
00080 
00087         void load_dtm(const std::string & path); 
00088 
00096         void dtm_scale(double scale);
00097 
00102         double dtm_scale() const;
00103 
00108         double cam_angle() const;
00109 
00117         void cam_angle(double angle);
00118 
00124         const jafar::geom::T3D&  cam_transfo() const;
00125 
00130         jafar::geom::T3D&  cam_transfo();
00131 
00138         void cam_transfo(jafar::geom::T3D& t3d);
00139 
00140 
00149         void get_im3d(jafar::geom::T3D & m2r, jafar::calife::Image3d & im3d); 
00150 
00151       private:
00152         geom::T3DEuler _sensorToMain; 
00153         double _max_vision;
00154 
00155         double _cam_angle_delta;
00156         double _cam_angle;
00157         std::vector <CosSin> _cos_sin_table;
00158 
00159         jafar::dtm::Dtm * _dtm;
00160         double _dtm_scale;
00161         double _dtm_x_orig;
00162         double _dtm_y_orig;
00163         void clear_dtm();
00164         void update_dtm_info();
00165 
00166         bool get_intersection(Point & A, Point & B, Point & res);
00167         bool check_point(Point & pt);
00168     };    
00169   }
00170 }
00171 
00172 #endif /* _JAFAR_STEREOSIMU_STEREOSIMU_HPP_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:28 for Jafar by doxygen 1.7.6.1
LAAS-CNRS