Matrix: added copyToRaw method to allow copying to a pointer

because most uORB messages still contain all components of a vector one by one after each other
This commit is contained in:
Matthias Grob
2017-11-17 09:30:56 +01:00
parent 308a6c91cb
commit 41ad2bdea5
2 changed files with 12 additions and 0 deletions
+5
View File
@@ -87,6 +87,11 @@ public:
memcpy(dst, _data, sizeof(dst));
}
void copyToRaw(Type *dst) const
{
memcpy(dst, _data, sizeof(_data));
}
void copyToColumnMajor(Type (&dst)[M*N]) const
{
const Matrix<Type, M, N> &self = *this;