Main MRPT website > C++ reference for MRPT 1.5.9
CVisualizer.h
Go to the documentation of this file.
1 #ifndef CVISUALIZER_H
2 #define CVISUALIZER_H
3 
10 #include <mrpt/utils/TParameters.h>
12 
13 namespace mrpt { namespace graphs { namespace detail {
14 
15 /**\brief Base class for C*Visualizer classes.
16  *
17  * By default provides visualization for a CNetowrkOfPoses containing nodes and
18  * edges as constructed by a single agent/robot. Derived classes can inherit
19  * and partially modify the class behavior
20 */
21 template<
22  class CPOSE, // Type of edges
23  class MAPS_IMPLEMENTATION, // Use std::map<> vs. std::vector<>
24  class NODE_ANNOTATIONS=mrpt::graphs::detail::TNodeAnnotations,
26  >
27 class CVisualizer
28 {
29 public:
31  CPOSE,
32  MAPS_IMPLEMENTATION,
33  NODE_ANNOTATIONS,
34  EDGE_ANNOTATIONS> GRAPH_T;
35  /**\brief Constructor
36  */
37  CVisualizer(const GRAPH_T& graph_in);
38  /**\brief Destructor
39  */
40  virtual ~CVisualizer();
41  /**\brief Common visualization stuff for all derived classes
42  *
43  * Function delegates visualization tasks to the draw* methods according to
44  * the user preferences
45  *
46  */
47  virtual void getAs3DObject(
48  mrpt::opengl::CSetOfObjectsPtr& object,
49  mrpt::utils::TParametersDouble viz_params) const;
50 
51 protected:
52  /**\name Work-splitting methods
53  * \brief Smaller functions that do add very specific parts to the visual representation
54  *
55  * Following functions take an optional TParametersDouble instance containing
56  * visualization parameters
57  *
58  */
59  /**\{ */
60  virtual void drawGroundGrid(mrpt::opengl::CSetOfObjectsPtr& object,
61  const mrpt::utils::TParametersDouble* viz_params=NULL) const;
62  virtual void drawNodeCorners(mrpt::opengl::CSetOfObjectsPtr& object,
63  const mrpt::utils::TParametersDouble* viz_params=NULL) const;
64  virtual void drawNodePoints(mrpt::opengl::CSetOfObjectsPtr& object,
65  const mrpt::utils::TParametersDouble* viz_params=NULL) const;
66  virtual void drawEdgeRelPoses(mrpt::opengl::CSetOfObjectsPtr& object,
67  const mrpt::utils::TParametersDouble* viz_params=NULL) const;
68  virtual void drawEdges(mrpt::opengl::CSetOfObjectsPtr& object,
69  const mrpt::utils::TParametersDouble* viz_params=NULL) const;
70 
71  /**\} */
72 
74  const GRAPH_T& m_graph;
75 };
76 
77 
78 } } } // end of namespaces
79 
81 
82 #endif /* end of include guard: CVISUALIZER_H */
virtual ~CVisualizer()
Destructor.
Abstract class from which NodeAnnotations related classes can be implemented.
virtual void drawNodeCorners(mrpt::opengl::CSetOfObjectsPtr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
A directed graph of pose constraints, with edges being the relative poses between pairs of nodes iden...
CVisualizer(const GRAPH_T &graph_in)
Constructor.
mrpt::graphs::CNetworkOfPoses< CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS, EDGE_ANNOTATIONS > GRAPH_T
Definition: CVisualizer.h:34
virtual void drawEdgeRelPoses(mrpt::opengl::CSetOfObjectsPtr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
virtual void drawGroundGrid(mrpt::opengl::CSetOfObjectsPtr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
virtual void getAs3DObject(mrpt::opengl::CSetOfObjectsPtr &object, mrpt::utils::TParametersDouble viz_params) const
Common visualization stuff for all derived classes.
virtual void drawNodePoints(mrpt::opengl::CSetOfObjectsPtr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
virtual void drawEdges(mrpt::opengl::CSetOfObjectsPtr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020