Main MRPT website > C++ reference for MRPT 1.4.0
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-2016, 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
14
15namespace 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> edge_color </code></td>
53 * <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>
54 * <td align="center" > 0x400000FF </td>
55 * </tr>
56 * <tr>
57 * <td align="center" ><code> edge_width </code></td>
58 * <td> If show_edges is !=0, the width of edge lines.</td>
59 * <td align="center" > 2.0 </td>
60 * </tr>
61 * <tr>
62 * <td align="center" ><code> show_node_corners </code></td>
63 * <td> If set to !=0, draw a small 3D corner frame at each node (see mrpt::opengl::stock_objects::CornerXYZSimple). </td>
64 * <td align="center" > 1 (do show) </td>
65 * </tr>
66 * <tr>
67 * <td align="center" ><code> show_edge_rel_poses </code></td>
68 * <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>
69 * <td align="center" > 1 (do show) </td>
70 * </tr>
71 * <tr>
72 * <td align="center" ><code> edge_rel_poses_color </code></td>
73 * <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>
74 * <td align="center" > 0x40FF8000 </td>
75 * </tr>
76 * <tr>
77 * <td align="center" ><code> nodes_edges_corner_scale </code></td>
78 * <td> If show_edge_rel_poses is !=0, the size of the corners at the end of each drawn edge.</td>
79 * <td align="center" > 0.4 </td>
80 * </tr>
81 * <tr>
82 * <td align="center" ><code> nodes_corner_scale </code></td>
83 * <td> If show_node_corners!=0, the size (length) of te corner lines. </td>
84 * <td align="center" > 0.7 </td>
85 * </tr>
86 * <tr>
87 * <td align="center" ><code> nodes_point_size </code></td>
88 * <td> If set to !=0, draw a point of the given size (glPointSize) at each node.</td>
89 * <td align="center" > 0 (no points) </td>
90 * </tr>
91 * <tr>
92 * <td align="center" ><code> nodes_point_color </code></td>
93 * <td> If nodes_point_size!=0, set this value to a hexadecimal int value 0xRRGGBB with the desired RGB color of points.</td>
94 * <td align="center" > 0xA0A0A0 (light gray) </td>
95 * </tr>
96 * </table>
97 *
98 * \sa mrpt::graphs::CNetworkOfPoses2D, mrpt::graphs::CNetworkOfPoses3D, mrpt::graphs::CNetworkOfPoses2DInf, mrpt::graphs::CNetworkOfPoses3DInf
99 * \note Implemented as headers-only in \a graph_tools_impl.h
100 * \ingroup mrpt_opengl_grp
101 */
102 template<class GRAPH_T>
104 const GRAPH_T &g,
106 );
107
108 /** @} */
109 }
110 }
111
112} // End of namespace
113
114#include "graph_tools_impl.h"
115
116#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.
struct OPENGL_IMPEXP CSetOfObjectsPtr
Definition: CSetOfObjects.h:23
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
For usage when passing a dynamic number of (numeric) arguments to a function, by name.
Definition: TParameters.h:47



Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Wed Mar 22 06:16:42 UTC 2023