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