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-2018, 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 
20 
21 namespace mrpt::graphs::detail
22 {
23 /**\brief Base class for C*Visualizer classes.
24  *
25  * By default provides visualization for a CNetowrkOfPoses containing nodes and
26  * edges as constructed by a single agent/robot. Derived classes can inherit
27  * and partially modify the class behavior
28  */
29 template <
30  class CPOSE, // Type of edges
31  class MAPS_IMPLEMENTATION, // Use std::map<> vs. std::vector<>
32  class NODE_ANNOTATIONS = mrpt::graphs::detail::TNodeAnnotations,
33  class EDGE_ANNOTATIONS = mrpt::graphs::detail::edge_annotations_empty>
35 {
36  public:
38  CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS, EDGE_ANNOTATIONS>;
39  /**\brief Constructor
40  */
41  CVisualizer(const GRAPH_T& graph_in);
42  /**\brief Destructor
43  */
44  virtual ~CVisualizer();
45  /**\brief Common visualization stuff for all derived classes
46  *
47  * Function delegates visualization tasks to the draw* methods according to
48  * the user preferences
49  *
50  */
51  virtual void getAs3DObject(
53  mrpt::system::TParametersDouble viz_params) const;
54 
55  protected:
56  /**\name Work-splitting methods
57  * \brief Smaller functions that do add very specific parts to the visual
58  * representation
59  *
60  * Following functions take an optional TParametersDouble instance
61  * containing
62  * visualization parameters
63  *
64  */
65  /**\{ */
66  virtual void drawGroundGrid(
68  const mrpt::system::TParametersDouble* viz_params = NULL) const;
69  virtual void drawNodeCorners(
71  const mrpt::system::TParametersDouble* viz_params = NULL) const;
72  virtual void drawNodePoints(
74  const mrpt::system::TParametersDouble* viz_params = NULL) const;
75  virtual void drawEdgeRelPoses(
77  const mrpt::system::TParametersDouble* viz_params = NULL) const;
78  virtual void drawEdges(
80  const mrpt::system::TParametersDouble* viz_params = NULL) const;
81 
82  /**\} */
83 
85  const GRAPH_T& m_graph;
86 };
87 }
89 
90 #endif /* end of include guard: CVISUALIZER_H */
91 
92 
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:35
virtual void drawNodeCorners(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::system::TParametersDouble *viz_params=NULL) const
CVisualizer(const GRAPH_T &graph_in)
Constructor.
virtual void drawNodePoints(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::system::TParametersDouble *viz_params=NULL) const
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=NULL) const
virtual void drawGroundGrid(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::system::TParametersDouble *viz_params=NULL) const
virtual void drawEdges(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::system::TParametersDouble *viz_params=NULL) const
std::shared_ptr< CSetOfObjects > Ptr
Definition: CSetOfObjects.h:28
Internal functions for MRPT.
Abstract class from which NodeAnnotations related classes can be implemented.



Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 814d80880 Fri Aug 24 01:51:28 2018 +0200 at mar 26 may 2026 12:30:59 CEST