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-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
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 <
34  class CPOSE, // Type of edges
35  class MAPS_IMPLEMENTATION, // Use std::map<> vs. std::vector<>
36  class NODE_ANNOTATIONS = mrpt::graphs::detail::TNodeAnnotations,
37  class EDGE_ANNOTATIONS = mrpt::graphs::detail::edge_annotations_empty>
38 class CVisualizer
39 {
40  public:
42  CPOSE, MAPS_IMPLEMENTATION, 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::system::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::system::TParametersDouble* viz_params = NULL) const;
73  virtual void drawNodeCorners(
75  const mrpt::system::TParametersDouble* viz_params = NULL) const;
76  virtual void drawNodePoints(
78  const mrpt::system::TParametersDouble* viz_params = NULL) const;
79  virtual void drawEdgeRelPoses(
81  const mrpt::system::TParametersDouble* viz_params = NULL) const;
82  virtual void drawEdges(
84  const mrpt::system::TParametersDouble* viz_params = NULL) const;
85 
86  /**\} */
87 
89  const GRAPH_T& m_graph;
90 };
91 } // namespace detail
92 } // namespace graphs
93 } // namespace mrpt
94 
96 
97 #endif /* end of include guard: CVISUALIZER_H */
CSetOfLines.h
mrpt::graphs::detail::CVisualizer::m_graph
const GRAPH_T & m_graph
Definition: CVisualizer.h:89
mrpt::graphs::detail::edge_annotations_empty
An empty structure.
Definition: CDirectedGraph.h:48
CNetworkOfPoses.h
CVisualizer_impl.h
CSimpleLine.h
mrpt::graphs::detail::CVisualizer::getAs3DObject
virtual void getAs3DObject(mrpt::opengl::CSetOfObjects::Ptr &object, mrpt::system::TParametersDouble viz_params) const
Common visualization stuff for all derived classes.
Definition: CVisualizer_impl.h:43
CSetOfObjects.h
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::graphs::detail::CVisualizer::GRAPH_T
mrpt::graphs::CNetworkOfPoses< CPOSE, MAPS_IMPLEMENTATION, NODE_ANNOTATIONS, EDGE_ANNOTATIONS > GRAPH_T
Definition: CVisualizer.h:42
stock_objects.h
CPointCloud.h
TParameters.h
mrpt::graphs::detail::CVisualizer::drawEdgeRelPoses
virtual void drawEdgeRelPoses(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::system::TParametersDouble *viz_params=NULL) const
Definition: CVisualizer_impl.h:211
mrpt::graphs::detail::CVisualizer::drawNodeCorners
virtual void drawNodeCorners(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::system::TParametersDouble *viz_params=NULL) const
Definition: CVisualizer_impl.h:166
mrpt::system::TParameters< double >
mrpt::graphs::detail::CVisualizer::CVisualizer
CVisualizer(const GRAPH_T &graph_in)
Constructor.
Definition: CVisualizer_impl.h:23
mrpt::opengl::CSetOfObjects::Ptr
std::shared_ptr< CSetOfObjects > Ptr
Definition: CSetOfObjects.h:30
mrpt::graphs::detail::CVisualizer::m_is_3D_graph
bool m_is_3D_graph
Definition: CVisualizer.h:88
mrpt::graphs::CNetworkOfPoses
A directed graph of pose constraints, with edges being the relative poses between pairs of nodes iden...
Definition: CNetworkOfPoses.h:122
mrpt::graphs::detail::CVisualizer::drawNodePoints
virtual void drawNodePoints(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::system::TParametersDouble *viz_params=NULL) const
Definition: CVisualizer_impl.h:130
mrpt::graphs::detail::CVisualizer::~CVisualizer
virtual ~CVisualizer()
Destructor.
Definition: CVisualizer_impl.h:33
mrpt::graphs::detail::CVisualizer::drawEdges
virtual void drawEdges(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::system::TParametersDouble *viz_params=NULL) const
Definition: CVisualizer_impl.h:280
CGridPlaneXY.h
mrpt::graphs::detail::TNodeAnnotations
Abstract class from which NodeAnnotations related classes can be implemented.
Definition: TNodeAnnotations.h:31
mrpt::graphs::detail::CVisualizer::drawGroundGrid
virtual void drawGroundGrid(mrpt::opengl::CSetOfObjects::Ptr &object, const mrpt::system::TParametersDouble *viz_params=NULL) const
Definition: CVisualizer_impl.h:92



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST