Main MRPT website
>
C++ reference for MRPT 1.9.9
xSens_MT4
xstypes
include
xsens
xsmatrix3x3.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
#ifndef XSMATRIX3X3_H
10
#define XSMATRIX3X3_H
11
12
#include "
xsmatrix.h
"
13
14
struct
XsMatrix3x3
;
15
#ifdef __cplusplus
16
extern
"C"
{
17
#else
18
typedef
struct
XsMatrix3x3
XsMatrix3x3
;
19
#endif
20
21
XSTYPES_DLL_API
void
XsMatrix3x3_construct
(
XsMatrix3x3
* thisPtr);
22
XSTYPES_DLL_API
void
XsMatrix3x3_assign
(
23
XsMatrix3x3
* thisPtr,
const
XsReal
*
src
,
XsSize
srcStride);
24
XSTYPES_DLL_API
void
XsMatrix3x3_destruct
(
XsMatrix3x3
* thisPtr);
25
XSTYPES_DLL_API
void
XsMatrix3x3_copy
(
XsMatrix
* copy,
XsMatrix3x3
const
*
src
);
26
27
#ifdef __cplusplus
28
}
// extern "C"
29
#endif
30
31
#ifdef __cplusplus
32
/* This is allowed since the C standard says that no padding appears before the
33
first member of a struct.
34
Basically we're defining a union between a C++ inherited type and a C
35
encapsulated type.
36
*/
37
struct
XsMatrix3x3
:
public
XsMatrix
38
{
39
XSCPPPROTECTED
40
#else
41
struct
XsMatrix3x3
42
{
43
/** The underlying XsMatrix */
44
struct
XsMatrix
m_matrix
;
45
#endif
46
/** Fixed storage for the elements of the matrix */
47
XsReal
XSCCONST
m_fixedData
[9];
48
49
#ifdef __cplusplus
50
public
:
51
//! \brief Constructs an XsMatrix3x3
52
XsMatrix3x3
() :
XsMatrix
(
m_fixedData
, 3, 3, 3,
XSDF_FixedSize
) {}
53
//! \brief Constructs an XsMatrix3x3 from an \a other XsMatrix
54
XsMatrix3x3
(
const
XsMatrix
& other)
55
:
XsMatrix
(other,
m_fixedData
, 3, 3, 3,
XSDF_FixedSize
)
56
{
57
}
58
59
//! \brief Constructs an XsMatrix3x3 from an \a other XsMatrix
60
XsMatrix3x3
(
const
XsMatrix3x3
& other)
61
:
XsMatrix
(other,
m_fixedData
, 3, 3, 3,
XSDF_FixedSize
)
62
{
63
}
64
65
//! \brief Constructs an XsMatrix3x3 from a set of values
66
XsMatrix3x3
(
67
XsReal
r1c1,
XsReal
r1c2,
XsReal
r1c3,
XsReal
r2c1,
XsReal
r2c2,
68
XsReal
r2c3,
XsReal
r3c1,
XsReal
r3c2,
XsReal
r3c3)
69
:
XsMatrix
(
m_fixedData
, 3, 3, 3,
XSDF_FixedSize
)
70
{
71
m_fixedData
[0] = r1c1;
72
m_fixedData
[1] = r1c2;
73
m_fixedData
[2] = r1c3;
74
m_fixedData
[3] = r2c1;
75
m_fixedData
[4] = r2c2;
76
m_fixedData
[5] = r2c3;
77
m_fixedData
[6] = r3c1;
78
m_fixedData
[7] = r3c2;
79
m_fixedData
[8] = r3c3;
80
}
81
// using XsMatrix::operator=;
82
// using XsMatrix::operator[];
83
#endif
84
};
85
86
#endif // file guard
XSCCONST
#define XSCCONST
Definition:
xstypesconfig.h:56
XsMatrix3x3_construct
XSTYPES_DLL_API void XsMatrix3x3_construct(XsMatrix3x3 *thisPtr)
XsMatrix3x3
struct XsMatrix3x3 XsMatrix3x3
Definition:
xsmatrix3x3.h:18
src
GLuint src
Definition:
glext.h:7278
XsMatrix3x3::m_fixedData
XsReal XSCCONST m_fixedData[9]
Fixed storage for the elements of the matrix.
Definition:
xsmatrix3x3.h:47
XsMatrix3x3
Definition:
xsmatrix3x3.h:41
XSDF_FixedSize
@ XSDF_FixedSize
Definition:
xstypedefs.h:53
xsmatrix.h
XsMatrix
Definition:
xsmatrix.h:65
XSCPPPROTECTED
#define XSCPPPROTECTED
Definition:
xstypesconfig.h:57
XsReal
double XsReal
Defines the floating point type used by the Xsens libraries.
Definition:
xstypedefs.h:17
XsMatrix3x3_assign
XSTYPES_DLL_API void XsMatrix3x3_assign(XsMatrix3x3 *thisPtr, const XsReal *src, XsSize srcStride)
XsMatrix3x3_copy
XSTYPES_DLL_API void XsMatrix3x3_copy(XsMatrix *copy, XsMatrix3x3 const *src)
XsSize
size_t XsSize
XsSize must be unsigned number!
Definition:
xstypedefs.h:19
XSTYPES_DLL_API
#define XSTYPES_DLL_API
Definition:
xstypesconfig.h:9
XsMatrix3x3::m_matrix
struct XsMatrix m_matrix
The underlying XsMatrix.
Definition:
xsmatrix3x3.h:44
XsMatrix3x3_destruct
XSTYPES_DLL_API void XsMatrix3x3_destruct(XsMatrix3x3 *thisPtr)
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