fixed size skewSymmetric

release/4.3a0
Chris Beall 2012-04-11 15:15:12 +00:00
parent 5839d1bfaa
commit 6d28e0a039
2 changed files with 4 additions and 4 deletions

View File

@ -541,12 +541,12 @@ Matrix vector_scale(const Matrix& A, const Vector& v, bool inf_mask) {
} }
/* ************************************************************************* */ /* ************************************************************************* */
Matrix skewSymmetric(double wx, double wy, double wz) Matrix3 skewSymmetric(double wx, double wy, double wz)
{ {
return Matrix_(3,3, return (Matrix3() <<
0.0, -wz, +wy, 0.0, -wz, +wy,
+wz, 0.0, -wx, +wz, 0.0, -wx,
-wy, +wx, 0.0); -wy, +wx, 0.0).finished();
} }
/* ************************************************************************* */ /* ************************************************************************* */

View File

@ -395,7 +395,7 @@ Matrix vector_scale(const Matrix& A, const Vector& v, bool inf_mask = false); //
* @param wz * @param wz
* @return a 3*3 skew symmetric matrix * @return a 3*3 skew symmetric matrix
*/ */
Matrix skewSymmetric(double wx, double wy, double wz); Matrix3 skewSymmetric(double wx, double wy, double wz);
inline Matrix skewSymmetric(const Vector& w) { return skewSymmetric(w(0),w(1),w(2));} inline Matrix skewSymmetric(const Vector& w) { return skewSymmetric(w(0),w(1),w(2));}
/** Use SVD to calculate inverse square root of a matrix */ /** Use SVD to calculate inverse square root of a matrix */