mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
Initial structure for refactoring, some conversions still missing. Especially required further test cases.
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
|
||||
#ifndef BLACKMISC_POSMATRIX3X3_H
|
||||
#define BLACKMISC_POSMATRIX3X3_H
|
||||
|
||||
#include "blackmisc/mathmatrixbase.h"
|
||||
#include "blackmisc/mathmatrix1x3.h"
|
||||
#include "blackmisc/mathmatrix3x1.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -14,7 +14,7 @@ namespace Math
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief 3x1 matrix
|
||||
* \brief 3x3 matrix
|
||||
*/
|
||||
class CMatrix3x3 : public CMatrixBase<CMatrix3x3, 3, 3>
|
||||
{
|
||||
@@ -48,6 +48,66 @@ public:
|
||||
*/
|
||||
CMatrix3x3 inverse() const;
|
||||
|
||||
/*!
|
||||
* \brief Operator *=
|
||||
* \param otherMatrix
|
||||
* \return
|
||||
*/
|
||||
CMatrix3x3 &operator *=(const CMatrix3x3 &otherMatrix)
|
||||
{
|
||||
this->m_matrix = this->m_matrix * otherMatrix.m_matrix;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Operator *
|
||||
* \param otherMatrix
|
||||
* \return
|
||||
*/
|
||||
CMatrix3x1 operator *(const CMatrix3x1 &otherMatrix) const
|
||||
{
|
||||
CMatrix3x1 m;
|
||||
m.m_matrix = this->m_matrix * otherMatrix.m_matrix;
|
||||
return m;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Operator *
|
||||
* \param multiply
|
||||
* \return
|
||||
*/
|
||||
CMatrix3x3 operator *(const CMatrix3x3 &otherMatrix) const
|
||||
{
|
||||
CMatrix3x3 m(otherMatrix);
|
||||
m *= otherMatrix;
|
||||
return m;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Transposed matrix
|
||||
* \return
|
||||
*/
|
||||
CMatrix3x3 transposed() const
|
||||
{
|
||||
CMatrix3x3 m(0.0);
|
||||
m.m_matrix = this->m_matrix.transposed();
|
||||
return m;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Get column
|
||||
* \param column
|
||||
* \return
|
||||
*/
|
||||
CMatrix3x1 getColumn(int column) const;
|
||||
|
||||
/*!
|
||||
* \brief Get row
|
||||
* \param column
|
||||
* \return
|
||||
*/
|
||||
CMatrix1x3 getRow(int column) const;
|
||||
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user