toEigenMatrix functions matrix33 and matrix44
This commit is contained in:
parent
14ee78649b
commit
f1fce45d92
|
@ -75,6 +75,15 @@ public:
|
|||
m(i,j)=(*this)[i][j];
|
||||
}
|
||||
|
||||
template <class EigenMatrix33Type>
|
||||
EigenMatrix33Type ToEigenMatrix() const {
|
||||
EigenMatrix33Type m;
|
||||
for(int i = 0; i < 3; i++)
|
||||
for(int j = 0; j < 3; j++)
|
||||
m(i,j)=(*this)[i][j];
|
||||
return m;
|
||||
}
|
||||
|
||||
template <class EigenMatrix33Type>
|
||||
void FromEigenMatrix(const EigenMatrix33Type & m){
|
||||
for(int i = 0; i < 3; i++)
|
||||
|
@ -82,6 +91,8 @@ public:
|
|||
(*this)[i][j]=m(i,j);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static inline const Matrix33 &Identity( )
|
||||
{
|
||||
static Matrix33<S> tmp; tmp.SetIdentity();
|
||||
|
|
|
@ -158,6 +158,15 @@ public:
|
|||
m(i,j)=(*this)[i][j];
|
||||
}
|
||||
|
||||
template <class EigenMatrix44Type>
|
||||
EigenMatrix44Type ToEigenMatrix() const {
|
||||
EigenMatrix44Type m;
|
||||
for(int i = 0; i < 4; i++)
|
||||
for(int j = 0; j < 4; j++)
|
||||
m(i,j)=(*this)[i][j];
|
||||
return m;
|
||||
}
|
||||
|
||||
template <class EigenMatrix44Type>
|
||||
void FromEigenMatrix(const EigenMatrix44Type & m){
|
||||
for(int i = 0; i < 4; i++)
|
||||
|
|
Loading…
Reference in New Issue