MRPT
1.9.9
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::math
14
{
15
/** \name Container initializer from pose classes
16
* @{
17
*/
18
19
/** Conversion of poses to MRPT containers (vector/matrix) */
20
template
<
class
CONTAINER,
class
POINT_OR_POSE>
21
CONTAINER&
containerFromPoseOrPoint
(CONTAINER& C,
const
POINT_OR_POSE&
p
)
22
{
23
const
size_t
DIMS =
POINT_OR_POSE::static_size
;
24
C.resize(DIMS, 1);
25
for
(
size_t
i = 0; i < DIMS; i++)
26
C.coeffRef(i, 0) =
static_cast<
typename
CONTAINER::Scalar
>
(
p
[i]);
27
return
C;
28
}
29
30
/** @} */
31
32
}
33
Scalar
double Scalar
Definition:
KmUtils.h:44
static_size
Definition:
eigen_plugins.h:19
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:21
mrpt::math
This base provides a set of functions for maths stuff.
Definition:
math/include/mrpt/math/bits_math.h:11
math_frwds.h
p
GLfloat GLfloat p
Definition:
glext.h:6305
Page generated by
Doxygen 1.8.14
for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020