MRPT  1.9.9
xsmatrix3x3.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://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 {
18 #else
19 typedef struct XsMatrix3x3 XsMatrix3x3;
20 #endif
21 
24  XsMatrix3x3* thisPtr, const XsReal* src, XsSize srcStride);
27  XsMatrix* copy, XsMatrix3x3 const* src);
28 
29 #ifdef __cplusplus
30 } // extern "C"
31 #endif
32 
33 #ifdef __cplusplus
34 /* This is allowed since the C standard says that no padding appears before the
35  first member of a struct.
36  Basically we're defining a union between a C++ inherited type and a C
37  encapsulated type.
38 */
39 struct XsMatrix3x3 : public XsMatrix
40 {
42 #else
44 {
45  /** The underlying XsMatrix */
47 #endif
48  /** Fixed storage for the elements of the matrix */
50 
51 #ifdef __cplusplus
52  public:
53  //! \brief Constructs an XsMatrix3x3
55  //! \brief Constructs an XsMatrix3x3 from an \a other XsMatrix
56  XsMatrix3x3(const XsMatrix& other)
57  : XsMatrix(other, m_fixedData, 3, 3, 3, XSDF_FixedSize)
58  {
59  }
60 
61  //! \brief Constructs an XsMatrix3x3 from an \a other XsMatrix
62  XsMatrix3x3(const XsMatrix3x3& other)
63  : XsMatrix(other, m_fixedData, 3, 3, 3, XSDF_FixedSize)
64  {
65  }
66 
67  //! \brief Constructs an XsMatrix3x3 from a set of values
69  XsReal r1c1, XsReal r1c2, XsReal r1c3, XsReal r2c1, XsReal r2c2,
70  XsReal r2c3, XsReal r3c1, XsReal r3c2, XsReal r3c3)
72  {
73  m_fixedData[0] = r1c1;
74  m_fixedData[1] = r1c2;
75  m_fixedData[2] = r1c3;
76  m_fixedData[3] = r2c1;
77  m_fixedData[4] = r2c2;
78  m_fixedData[5] = r2c3;
79  m_fixedData[6] = r3c1;
80  m_fixedData[7] = r3c2;
81  m_fixedData[8] = r3c3;
82  }
83 // using XsMatrix::operator=;
84 // using XsMatrix::operator[];
85 #endif
86 };
87 
88 #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:7397
struct XsMatrix m_matrix
The underlying XsMatrix.
Definition: xsmatrix3x3.h:46
XsReal XSCCONST m_fixedData[9]
Fixed storage for the elements of the matrix.
Definition: xsmatrix3x3.h:49
#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:19
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: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019