Skip to content
Snippets Groups Projects
Commit 44e369a8 authored by jcarpent's avatar jcarpent
Browse files

[Spatial] Add temporary operator to act ont Eigen object

parent 21ce818d
No related branches found
No related tags found
No related merge requests found
......@@ -277,6 +277,22 @@ namespace se3
return d.se3ActionInverse(*this);
}
template<typename EigenDerived>
typename EigenDerived::PlainObject actOnEigenObject(const Eigen::MatrixBase<EigenDerived> & p)
{ return EigenDerived::PlainObject(rot*p+trans); }
template<typename MapDerived>
Vector3 actOnEigenObject(const Eigen::MapBase<MapDerived> & p)
{ return Vector3(rot*p+trans); }
template<typename EigenDerived>
typename EigenDerived::PlainObject actInvOnEigenObject(const Eigen::MatrixBase<EigenDerived> & p)
{ return EigenDerived::PlainObject(rot.transpose()*(p-trans)); }
template<typename MapDerived>
Vector3 actInvOnEigenObject(const Eigen::MapBase<MapDerived> & p)
{ return Vector3(rot.transpose()*(p-trans)); }
Vector3 act_impl (const Vector3& p) const { return Vector3(rot*p+trans); }
Vector3 actInv_impl(const Vector3& p) const { return Vector3(rot.transpose()*(p-trans)); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment