Go to the documentation of this file.00001
00004
00005
00006
00007
00008 #ifndef qglv_OBJECTS_EDGES_HPP_
00009 #define qglv_OBJECTS_EDGES_HPP_
00010
00011
00012
00013
00014
00015 #include <memory>
00016 #include <sophus/se3.hpp>
00017 #include <vector>
00018
00019 #include "../gl/colours.hpp"
00020
00021
00022
00023
00024
00025 namespace qglv {
00026
00027
00028
00029
00030
00038 class Edges {
00039
00040 public:
00041 Edges();
00042 virtual ~Edges();
00043 void add(const Sophus::SE3f& T_start, const Sophus::SE3f& T_end);
00044 void draw();
00045 void clear();
00046
00047
00048 private:
00049 virtual void _glGenLists();
00050 bool updated;
00051 int gl_id;
00053 std::vector< float > vertice_array;
00054 };
00055
00056
00057
00058
00059
00060
00068 class DirectedEdges {
00069
00070 public:
00071 DirectedEdges(const Colour& colour = Magenta, const float& radius = 0.005);
00072 virtual ~DirectedEdges();
00073 void add(const Sophus::SE3f& T_start, const Sophus::SE3f& T_end);
00074 void draw();
00075 void clear();
00076
00077 protected:
00078 virtual void _glGenLists();
00079 bool updated;
00080 int gl_id;
00081 const Colour colour;
00082 const float radius;
00083
00084 std::vector< std::pair<Sophus::SE3f, Sophus::SE3f> > transforms;
00085 };
00086
00087
00088
00089
00090
00091 typedef std::shared_ptr<Edges> EdgesPtr;
00092 typedef std::shared_ptr<DirectedEdges> DirectedEdgesPtr;
00093
00094
00095 }
00096
00097 #endif