Go to the documentation of this file.00001
00004
00005
00006
00007
00008 #ifndef qglv_OBJECTS_REFERENCE_FRAMES_HPP_
00009 #define qglv_OBJECTS_REFERENCE_FRAMES_HPP_
00010
00011
00012
00013
00014
00015 #include <map>
00016 #include <memory>
00017 #include <qglv/opengl.hpp>
00018 #include <sophus/se3.hpp>
00019
00020
00021
00022
00023
00024 namespace qglv {
00025
00026
00027
00028
00029
00034 class ReferenceFrame {
00035 public:
00036 enum Label {
00037 Map = 0,
00038 VisualOdom,
00039 Odom
00040 };
00041
00042 ReferenceFrame(
00043 const std::string& name,
00044 const Sophus::SE3f& T,
00045 const Colour &colour=Yellow,
00046 const Sophus::SE3f& parent=Sophus::SE3f(Eigen::Matrix3f::Identity(), Eigen::Vector3f::Zero())
00047 );
00048 ~ReferenceFrame();
00049
00050 void draw();
00051
00052 Sophus::SE3f T_frame_rel_map;
00053 std::string name;
00055 static const float default_keyframe_size;
00056
00057 private:
00058 void _glGenLists();
00059 Colour colour;
00060 int gl_id_start;
00061 };
00062
00063
00064
00065
00066
00067 typedef std::shared_ptr<ReferenceFrame> ReferenceFramePtr;
00068 typedef std::map<ReferenceFrame::Label, ReferenceFramePtr> ReferenceFrames;
00069
00070 }
00071
00072 #endif