Add support for Slice to Matrix, SquareMatrix, Vector

This commit is contained in:
Julian Kent
2019-09-16 16:11:08 +02:00
parent af1378cc55
commit 82d565f4d9
8 changed files with 77 additions and 20 deletions
+9 -1
View File
@@ -19,9 +19,12 @@ class Matrix;
template <typename Type, size_t M>
class Vector;
template<typename Type>
template <typename Type>
class Dcm;
template <typename Type>
class Vector2;
template<typename Type>
class Vector3 : public Vector<Type, 3>
{
@@ -48,6 +51,11 @@ public:
v(2) = z;
}
template<size_t P, size_t Q>
Vector3(const Slice<Type, 3, 1, P, Q>& slice_in) : Vector<Type, 3>(slice_in)
{
}
Vector3 cross(const Matrix31 & b) const {
const Vector3 &a(*this);
Vector3 c;