Main MRPT website
>
C++ reference for MRPT 1.9.9
mrpt
math
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-2018, 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
13
namespace
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
{
25
const
size_t
DIMS =
POINT_OR_POSE::static_size
;
26
C.resize(DIMS, 1);
27
for
(
size_t
i = 0; i < DIMS; i++)
28
C.coeffRef(i, 0) =
static_cast<
typename
CONTAINER::Scalar
>
(
p
[i]);
29
return
C;
30
}
31
32
/** @} */
33
34
}
// End of math namespace
35
}
// End of mrpt namespace
static_size
@ static_size
Definition:
eigen_plugins.h:19
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition:
CKalmanFilterCapable.h:30
p
GLfloat GLfloat p
Definition:
glext.h:6305
Scalar
double Scalar
Definition:
KmUtils.h:44
math_frwds.h
mrpt::math::containerFromPoseOrPoint
CONTAINER & containerFromPoseOrPoint(CONTAINER &C, const POINT_OR_POSE &p)
Conversion of poses (TPose2D,TPoint2D,..., mrpt::poses::CPoint2D,CPose3D,...) to MRPT containers (vec...
Definition:
point_poses2vectors.h:23
Page generated by
Doxygen 1.8.17
for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST