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



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 338471620 Mon Feb 17 00:12:39 2020 +0100 at lun feb 17 00:15:10 CET 2020