Main MRPT website > C++ reference for MRPT 1.9.9
CVisualizer.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CVISUALIZER_H
10 #define CVISUALIZER_H
11 
18 #include <mrpt/utils/TParameters.h>
20 
21 namespace mrpt
22 {
23 namespace graphs
24 {
25 namespace detail
26 {
27 /**\brief Base class for C*Visualizer classes.
28  *
29  * By default provides visualization for a CNetowrkOfPoses containing nodes and
30  * edges as constructed by a single agent/robot. Derived classes can inherit
31  * and partially modify the class behavior
32 */
33 template <class CPOSE, // Type of edges
34  class MAPS_IMPLEMENTATION, // Use std::map<> vs. std::vector<>
35  class NODE_ANNOTATIONS = mrpt::graphs::detail::TNodeAnnotations,
36  class EDGE_ANNOTATIONS = mrpt::graphs::detail::edge_annotations_empty>
38 {
39  public:
40  typedef mrpt::graphs::CNetworkOfPoses<CPOSE, MAPS_IMPLEMENTATION,
41  NODE_ANNOTATIONS, EDGE_ANNOTATIONS>
43  /**\brief Constructor
44  */
45  CVisualizer(const GRAPH_T& graph_in);
46  /**\brief Destructor
47  */
48  virtual ~CVisualizer();
49  /**\brief Common visualization stuff for all derived classes
50  *
51  * Function delegates visualization tasks to the draw* methods according to
52  * the user preferences
53  *
54  */
55  virtual void getAs3DObject(
57  mrpt::utils::TParametersDouble viz_params) const;
58 
59  protected:
60  /**\name Work-splitting methods
61  * \brief Smaller functions that do add very specific parts to the visual
62  * representation
63  *
64  * Following functions take an optional TParametersDouble instance
65  * containing
66  * visualization parameters
67  *
68  */
69  /**\{ */
70  virtual void drawGroundGrid(
72  const mrpt::utils::TParametersDouble* viz_params = NULL) const;
73  virtual void drawNodeCorners(
75  const mrpt::utils::TParametersDouble* viz_params = NULL) const;
76  virtual void drawNodePoints(
78  const mrpt::utils::TParametersDouble* viz_params = NULL) const;
79  virtual void drawEdgeRelPoses(
81  const mrpt::utils::TParametersDouble* viz_params = NULL) const;
82  virtual void drawEdges(
84  const mrpt::utils::TParametersDouble* viz_params = NULL) const;
85 
86  /**\} */
87 
89  const GRAPH_T& m_graph;
90 };
91 }
92 }
93 } // end of namespaces
94 
96 
97 #endif /* end of include guard: CVISUALIZER_H */
A directed graph of pose constraints, with edges being the relative poses between pairs of nodes iden...
Base class for C*Visualizer classes.
Definition: CVisualizer.h:38
CVisualizer(const GRAPH_T &graph_in)
Constructor.
virtual void drawNodePoints(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
virtual void drawNodeCorners(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
virtual void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr &object, mrpt::utils::TParametersDouble viz_params) const
Common visualization stuff for all derived classes.
virtual void drawEdgeRelPoses(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
virtual void drawEdges(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
virtual void drawGroundGrid(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::utils::TParametersDouble *viz_params=NULL) const
mrpt::graphs::CNetworkOfPoses< CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS, EDGE_ANNOTATIONS > GRAPH_T
Definition: CVisualizer.h:42
std::shared_ptr< CSetOfObjects > Ptr
Definition: CSetOfObjects.h:32
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Abstract class from which NodeAnnotations related classes can be implemented.



Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 63ea9d1f1 Thu Nov 23 00:06:53 2017 +0100 at mar 26 may 2026 12:19:29 CEST