Main MRPT website > C++ reference
MRPT logo

graph_tools.h

Go to the documentation of this file.
00001 /* +---------------------------------------------------------------------------+
00002    |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |
00003    |                                                                           |
00004    |                   http://mrpt.sourceforge.net/                            |
00005    |                                                                           |
00006    |   Copyright (C) 2005-2011  University of Malaga                           |
00007    |                                                                           |
00008    |    This software was written by the Machine Perception and Intelligent    |
00009    |      Robotics Lab, University of Malaga (Spain).                          |
00010    |    Contact: Jose-Luis Blanco  <jlblanco@ctima.uma.es>                     |
00011    |                                                                           |
00012    |  This file is part of the MRPT project.                                   |
00013    |                                                                           |
00014    |     MRPT is free software: you can redistribute it and/or modify          |
00015    |     it under the terms of the GNU General Public License as published by  |
00016    |     the Free Software Foundation, either version 3 of the License, or     |
00017    |     (at your option) any later version.                                   |
00018    |                                                                           |
00019    |   MRPT is distributed in the hope that it will be useful,                 |
00020    |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |
00021    |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |
00022    |     GNU General Public License for more details.                          |
00023    |                                                                           |
00024    |     You should have received a copy of the GNU General Public License     |
00025    |     along with MRPT.  If not, see <http://www.gnu.org/licenses/>.         |
00026    |                                                                           |
00027    +---------------------------------------------------------------------------+ */
00028 #ifndef opengl_graph_tools_H
00029 #define opengl_graph_tools_H
00030 
00031 #include <mrpt/opengl/CSetOfObjects.h>
00032 #include <mrpt/poses/CNetworkOfPoses.h>
00033 
00034 namespace mrpt
00035 {
00036         namespace opengl
00037         {
00038                 /** Tool functions for graphs of pose constraints.  */
00039                 namespace graph_tools
00040                 {
00041                         /** @name Tool functions for graphs of pose constraints
00042                             @{ */
00043 
00044                         /** Returns an opengl objects representation of an arbitrary graph, as a network of 3D pose frames.
00045                           *  Note that the "global" coordinates of each node are taken from mrpt::poses::CNetworkOfPoses::nodes, so
00046                           *   if a node appears in "edges" but not in "nodes" it will be not displayed.
00047                           *
00048                           *  \param g             The graph
00049                           *  \param extra_params  An extra set of optional parameters (see below).
00050                           * List of accepted extra parameters (note that all are double values, booleans are emulated with 0 & !=0 values):
00051                           *
00052                           *   <table align="center" >
00053                           *   <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>
00054                           *   <tr>
00055                           *        <td align="center" ><code> show_ID_labels </code></td>
00056                           *        <td> If set to !=0, show poses ID labels </td>
00057                           *        <td align="center" > 0 (don't show) </td>
00058                           *   </tr>
00059                           *   <tr>
00060                           *        <td align="center" ><code> show_ground_grid </code></td>
00061                           *        <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>
00062                           *        <td align="center" > 1 (do show) </td>
00063                           *   </tr>
00064                           *   <tr>
00065                           *        <td align="center" ><code> show_edges </code></td>
00066                           *        <td> If set to !=0, draw lines between nodes with at least one edge between them. </td>
00067                           *        <td align="center" > 1 (do show) </td>
00068                           *   </tr>
00069                           *   <tr>
00070                           *        <td align="center" ><code> edge_color </code></td>
00071                           *        <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>
00072                           *        <td align="center" > 0x400000FF </td>
00073                           *   </tr>
00074                           *   <tr>
00075                           *        <td align="center" ><code> edge_width </code></td>
00076                           *        <td> If show_edges is !=0, the width of edge lines.</td>
00077                           *        <td align="center" > 2.0 </td>
00078                           *   </tr>
00079                           *   <tr>
00080                           *        <td align="center" ><code> show_node_corners </code></td>
00081                           *        <td> If set to !=0, draw a small 3D corner frame at each node (see mrpt::opengl::stock_objects::CornerXYZSimple). </td>
00082                           *        <td align="center" > 1 (do show) </td>
00083                           *   </tr>
00084                           *   <tr>
00085                           *        <td align="center" ><code> nodes_corner_scale </code></td>
00086                           *        <td> If show_node_corners!=0, the size (length) of te corner lines. </td>
00087                           *        <td align="center" > 0.7 </td>
00088                           *   </tr>
00089                           *   <tr>
00090                           *        <td align="center" ><code> nodes_point_size </code></td>
00091                           *        <td> If set to !=0, draw a point of the given size (glPointSize) at each node.</td>
00092                           *        <td align="center" > 0 (no points) </td>
00093                           *   </tr>
00094                           *   <tr>
00095                           *        <td align="center" ><code> nodes_point_color </code></td>
00096                           *        <td> If nodes_point_size!=0, set this value to a hexadecimal int value 0xRRGGBB with the desired RGB color of points.</td>
00097                           *        <td align="center" > 0xA0A0A0 (light gray) </td>
00098                           *   </tr>
00099                           *       </table>
00100                           *
00101                           * \sa mrpt::poses::CNetworkOfPoses2D, mrpt::poses::CNetworkOfPoses3D, mrpt::poses::CNetworkOfPoses2DInf, mrpt::poses::CNetworkOfPoses3DInf
00102                           */
00103                         template<class CPOSE,class MAPIMPL>
00104                         CSetOfObjectsPtr OPENGL_IMPEXP graph_visualize(
00105                                 const mrpt::poses::CNetworkOfPoses<CPOSE,MAPIMPL> &g,
00106                                 const mrpt::utils::TParametersDouble &extra_params = mrpt::utils::TParametersDouble()
00107                                 );
00108 
00109                         /** @} */
00110                 }
00111         }
00112 
00113 } // End of namespace
00114 
00115 
00116 #endif



Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:40:17 UTC 2011