Main MRPT website > C++ reference for MRPT 1.9.9
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-2017, 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 
23  XsMatrix3x3* thisPtr, const XsReal* src, XsSize srcStride);
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 {
40 #else
42 {
43  /** The underlying XsMatrix */
45 #endif
46  /** Fixed storage for the elements of the matrix */
48 
49 #ifdef __cplusplus
50  public:
51  //! \brief Constructs an XsMatrix3x3
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
67  XsReal r1c1, XsReal r1c2, XsReal r1c3, XsReal r2c1, XsReal r2c2,
68  XsReal r2c3, XsReal r3c1, XsReal r3c2, XsReal r3c3)
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
XSTYPES_DLL_API void XsMatrix3x3_destruct(XsMatrix3x3 *thisPtr)
size_t XsSize
XsSize must be unsigned number!
Definition: xstypedefs.h:19
GLuint src
Definition: glext.h:7278
struct XsMatrix m_matrix
The underlying XsMatrix.
Definition: xsmatrix3x3.h:44
XsReal XSCCONST m_fixedData[9]
Fixed storage for the elements of the matrix.
Definition: xsmatrix3x3.h:47
#define XSCPPPROTECTED
Definition: xstypesconfig.h:57
XSTYPES_DLL_API void XsMatrix3x3_assign(XsMatrix3x3 *thisPtr, const XsReal *src, XsSize srcStride)
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:9
struct XsMatrix3x3 XsMatrix3x3
Definition: xsmatrix3x3.h:18
double XsReal
Defines the floating point type used by the Xsens libraries.
Definition: xstypedefs.h:17
XSTYPES_DLL_API void XsMatrix3x3_construct(XsMatrix3x3 *thisPtr)
#define XSCCONST
Definition: xstypesconfig.h:56
XSTYPES_DLL_API void XsMatrix3x3_copy(XsMatrix *copy, XsMatrix3x3 const *src)



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019