453 |
|
result(i, j) += m1(i, k) * m2(k, j); |
454 |
|
|
455 |
|
return result; |
456 |
+ |
} |
457 |
+ |
|
458 |
+ |
template<typename Real> |
459 |
+ |
inline SquareMatrix3<Real> outProduct(const Vector3<Real>& v1, const Vector3<Real>& v2) { |
460 |
+ |
SquareMatrix3<Real> result; |
461 |
+ |
|
462 |
+ |
for (unsigned int i = 0; i < 3; i++) { |
463 |
+ |
for (unsigned int j = 0; j < 3; j++) { |
464 |
+ |
result(i, j) = v1[i] * v2[j]; |
465 |
+ |
} |
466 |
+ |
} |
467 |
+ |
|
468 |
+ |
return result; |
469 |
|
} |
470 |
|
|
471 |
+ |
|
472 |
|
typedef SquareMatrix3<double> Mat3x3d; |
473 |
|
typedef SquareMatrix3<double> RotMat3x3d; |
474 |
|
|