Main MRPT website > C++ reference for MRPT 1.5.9
graph_tools.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 opengl_graph_tools_H
10 #define opengl_graph_tools_H
11 
13 #include <mrpt/utils/TParameters.h>
14 
15 namespace mrpt
16 {
17  /** \ingroup mrpt_opengl_grp */
18  namespace opengl
19  {
20  /** Tool functions for graphs of pose constraints. \ingroup mrpt_opengl_grp */
21  namespace graph_tools
22  {
23  /** @name Tool functions for graphs of pose constraints
24  @{ */
25 
26  /** Returns an opengl objects representation of an arbitrary graph, as a network of 3D pose frames.
27  * Note that the "global" coordinates of each node are taken from mrpt::graphs::CNetworkOfPoses::nodes, so
28  * if a node appears in "edges" but not in "nodes" it will be not displayed.
29  *
30  * \param g The graph
31  * \param extra_params An extra set of optional parameters (see below).
32  * List of accepted extra parameters (note that all are double values, booleans are emulated with 0 & !=0 values):
33  *
34  * <table align="center" >
35  * <tr> <td align="center" ><b>Parameter name</b></td> <td align="center" > <b>Description</b> </td> <td align="center" ><b>Default value</b></td> </tr>
36  * <tr>
37  * <td align="center" ><code> show_ID_labels </code></td>
38  * <td> If set to !=0, show poses ID labels </td>
39  * <td align="center" > 0 (don't show) </td>
40  * </tr>
41  * <tr>
42  * <td align="center" ><code> show_ground_grid </code></td>
43  * <td> If set to !=0, create a gray grid on the ground level (mrpt::opengl::CGridPlaneXY). The extension of the grid is computed to cover the entire graph extension </td>
44  * <td align="center" > 1 (do show) </td>
45  * </tr>
46  * <tr>
47  * <td align="center" ><code> show_edges </code></td>
48  * <td> If set to !=0, draw lines between nodes with at least one edge between them. </td>
49  * <td align="center" > 1 (do show) </td>
50  * </tr>
51  * <tr>
52  * <td align="center" ><code> show_node_corners </code></td>
53  * <td> If set to !=0, draw a small 3D corner frame at each node (see mrpt::opengl::stock_objects::CornerXYZSimple). </td>
54  * <td align="center" > 1 (do show) </td>
55  * </tr>
56  * <tr>
57  * <td align="center" ><code> show_edge_rel_poses </code></td>
58  * <td> If set to !=0, draw the relative poses stored in each edge as a small extra 3D corner frame at each node pose (+) the edge pose (see mrpt::opengl::stock_objects::CornerXYZSimple). </td>
59  * <td align="center" > 1 (do show) </td>
60  * </tr>
61  * <tr>
62  * <td align="center" ><code> nodes_point_size </code></td>
63  * <td> If set to !=0, draw a point of the given size (glPointSize) at each node.</td>
64  * <td align="center" > 0 (no points) </td>
65  * </tr>
66  *
67  * <tr>
68  * <td align="center" ><code> nodes_corner_scale </code></td>
69  * <td> If show_node_corners!=0, the size (length) of te corner lines. </td>
70  * <td align="center" > 0.7 </td>
71  * </tr>
72  * <tr>
73  * <td align="center" ><code> nodes_edges_corner_scale </code></td>
74  * <td> If show_edge_rel_poses is !=0, the size of the corners at the end of each drawn edge.</td>
75  * <td align="center" > 0.4 </td>
76  * </tr>
77  * <tr>
78  * <td align="center" ><code> nodes_point_color </code></td>
79  * <td> If nodes_point_size!=0, set this value to a hexadecimal int value 0xRRGGBB with the desired RGB color of points.</td>
80  * <td align="center" > 0xA0A0A0 (light gray) </td>
81  * </tr>
82  * <tr>
83  * <td align="center" ><code> edge_color </code></td>
84  * <td> If show_edges is !=0, the color of those edges as a hexadecimal int value 0xAARRGGBB with Alpha+RGB color (Alpha=0xFF:opaque,0x00:transparent).</td>
85  * <td align="center" > 0x400000FF </td>
86  * </tr>
87  *
88  * <tr>
89  * <td align="center" ><code> edge_rel_poses_color </code></td>
90  * <td> If show_edge_rel_poses is !=0, the color of those edges as a hexadecimal int value 0xAARRGGBB with Alpha+RGB color (Alpha=0xFF:opaque,0x00:transparent).</td>
91  * <td align="center" > 0x40FF8000 </td>
92  * </tr>
93  * <tr>
94  * <td align="center" ><code> edge_width </code></td>
95  * <td> If show_edges is !=0, the width of edge lines.</td>
96  * <td align="center" > 2.0 </td>
97  * </tr>
98  *
99  * </table>
100  *
101  * \sa mrpt::graphs::CNetworkOfPoses2D, mrpt::graphs::CNetworkOfPoses3D, mrpt::graphs::CNetworkOfPoses2DInf, mrpt::graphs::CNetworkOfPoses3DInf
102  * \note Implemented as headers-only in \a graph_tools_impl.h
103  * \ingroup mrpt_opengl_grp
104  */
105  template<class GRAPH_T>
106  CSetOfObjectsPtr graph_visualize(
107  const GRAPH_T &g,
109  );
110 
111  /** @} */
112  }
113  }
114 
115 } // End of namespace
116 
117 #include "graph_tools_impl.h"
118 
119 #endif
CSetOfObjectsPtr graph_visualize(const GRAPH_T &g, const mrpt::utils::TParametersDouble &extra_params=mrpt::utils::TParametersDouble())
Returns an opengl objects representation of an arbitrary graph, as a network of 3D pose frames...
GLubyte g
Definition: glext.h:5575
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



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