mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 21:23:34 +08:00
Add support for Slice to Matrix, SquareMatrix, Vector
This commit is contained in:
+9
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user