Main MRPT website > C++ reference for MRPT 1.4.0
point_poses2vectors.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#pragma once
10
11#include <mrpt/math/math_frwds.h> // forward declarations
12
13namespace mrpt
14{
15 namespace math
16 {
17 /** \name Container initializer from pose classes
18 * @{
19 */
20
21 /** Conversion of poses to MRPT containers (vector/matrix) */
22 template <class CONTAINER,class POINT_OR_POSE>
23 CONTAINER & containerFromPoseOrPoint(CONTAINER &C, const POINT_OR_POSE &p) {
24 const size_t DIMS = POINT_OR_POSE::static_size;
25 C.resize(DIMS,1);
26 for (size_t i=0;i<DIMS;i++) C.coeffRef(i,0)=p[i];
27 return C;
28 }
29
30 /** @} */
31
32 } // End of math namespace
33} // End of mrpt namespace
CONTAINER & containerFromPoseOrPoint(CONTAINER &C, const POINT_OR_POSE &p)
Conversion of poses (TPose2D,TPoint2D,..., mrpt::poses::CPoint2D,CPose3D,...) to MRPT containers (vec...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.



Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Fri Jan 20 00:45:34 UTC 2023