Main MRPT website > C++ reference for MRPT 1.5.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 
21 
23 XSTYPES_DLL_API void XsMatrix3x3_assign(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 first member of a struct.
33  Basically we're defining a union between a C++ inherited type and a C encapsulated type.
34 */
35 struct XsMatrix3x3 : public XsMatrix {
37 #else
38 struct XsMatrix3x3 {
39  struct XsMatrix m_matrix; //!< The underlying XsMatrix
40 #endif
41  XsReal XSCCONST m_fixedData[9]; //!< Fixed storage for the elements of the matrix
42 
43 #ifdef __cplusplus
44 public:
45  //! \brief Constructs an XsMatrix3x3
47  {
48  }
49 
50  //! \brief Constructs an XsMatrix3x3 from an \a other XsMatrix
51  XsMatrix3x3(const XsMatrix& other) : XsMatrix(other, m_fixedData, 3, 3, 3, XSDF_FixedSize)
52  {
53  }
54 
55  //! \brief Constructs an XsMatrix3x3 from an \a other XsMatrix
56  XsMatrix3x3(const XsMatrix3x3& other) : XsMatrix(other, m_fixedData, 3, 3, 3, XSDF_FixedSize)
57  {
58  }
59 
60  //! \brief Constructs an XsMatrix3x3 from a set of values
61  XsMatrix3x3(XsReal r1c1, XsReal r1c2, XsReal r1c3,
62  XsReal r2c1, XsReal r2c2, XsReal r2c3,
63  XsReal r3c1, XsReal r3c2, XsReal r3c3) : XsMatrix(m_fixedData, 3, 3, 3, XSDF_FixedSize)
64  {
65  m_fixedData[0] = r1c1;
66  m_fixedData[1] = r1c2;
67  m_fixedData[2] = r1c3;
68  m_fixedData[3] = r2c1;
69  m_fixedData[4] = r2c2;
70  m_fixedData[5] = r2c3;
71  m_fixedData[6] = r3c1;
72  m_fixedData[7] = r3c2;
73  m_fixedData[8] = r3c3;
74  }
75 // using XsMatrix::operator=;
76 // using XsMatrix::operator[];
77 #endif
78 };
79 
80 #endif // file guard
XSTYPES_DLL_API void XsMatrix3x3_destruct(XsMatrix3x3 *thisPtr)
size_t XsSize
XsSize must be unsigned number!
Definition: xstypedefs.h:17
GLuint src
Definition: glext.h:6303
struct XsMatrix m_matrix
The underlying XsMatrix.
Definition: xsmatrix3x3.h:39
XsReal XSCCONST m_fixedData[9]
Fixed storage for the elements of the matrix.
Definition: xsmatrix3x3.h:41
#define XSCPPPROTECTED
Definition: xstypesconfig.h:56
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:16
The contained data points to a fixed-size buffer, this allows creation of dynamic objects on the stac...
Definition: xstypedefs.h:40
XSTYPES_DLL_API void XsMatrix3x3_construct(XsMatrix3x3 *thisPtr)
#define XSCCONST
Definition: xstypesconfig.h:55
XSTYPES_DLL_API void XsMatrix3x3_copy(XsMatrix *copy, XsMatrix3x3 const *src)



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020