path.hpp
Go to the documentation of this file.
00001 
00004 /*****************************************************************************
00005 ** Ifdefs
00006 *****************************************************************************/
00007 
00008 #ifndef qglv_OBJECTS_PATH_HPP_
00009 #define qglv_OBJECTS_PATH_HPP_
00010 
00011 /*****************************************************************************
00012 ** Includes
00013 *****************************************************************************/
00014 
00015 #include <deque>
00016 #include <memory>
00017 #include <sophus/se3.hpp>
00018 #include <vector>
00019 
00020 #include "../gl/colours.hpp"
00021 
00022 /*****************************************************************************
00023 ** Namespaces
00024 *****************************************************************************/
00025 
00026 namespace qglv {
00027 
00028 /*****************************************************************************
00029 ** Interfaces
00030 *****************************************************************************/
00031 
00040 class Path {
00041 public:
00042   Path(const Colour& colour = Magenta,
00043        const float& arrow_radius = 0.01,
00044        const float& default_length = 0.3);
00045   ~Path();
00046 
00047   void add(const Sophus::SE3f& pose);
00048   void add(const Sophus::SE3f& pose, const float& length);
00049   void draw();
00050 
00051 private:
00052   int gl_id;
00053   bool need_to_rebuild_gl_list;
00054   float arrow_radius, default_length;
00055   Colour colour;
00056 
00057   std::vector<std::pair<Sophus::SE3f, float>> data;
00058   void _glGenLists();
00059 };
00060 
00061 /*****************************************************************************
00062  ** Typedefs
00063  *****************************************************************************/
00064 
00065 typedef std::shared_ptr<Path> PathPtr;
00066 
00067 
00068 /*****************************************************************************
00069  ** Trailers
00070  *****************************************************************************/
00071 
00072 } // namespace qglv
00073 
00074 #endif /* qglv_OBJECTS_PATH_HPP_ */


qglv_opengl
Author(s): Daniel Stonier
autogenerated on Sat Jun 18 2016 08:19:28