Biorbd Release_1.13.0
Loading...
Searching...
No Matches
SpatialVector.h
1#ifndef BIORBD_UTILS_SPATIAL_VECTOR_H
2#define BIORBD_UTILS_SPATIAL_VECTOR_H
3
4#include "biorbdConfig.h"
5
6#include "Utils/Scalar.h"
7#include "rbdl/rbdl_math.h"
8
9namespace BIORBD_NAMESPACE {
10namespace utils {
11class Vector3d;
12
16#ifdef SWIG
17class BIORBD_API SpatialVector
18#else
19class BIORBD_API SpatialVector : public RigidBodyDynamics::Math::SpatialVector
20#endif
21{
22 public:
27
32 SpatialVector(const SpatialVector& other);
33
40
41#ifndef SWIG
46 SpatialVector(const RigidBodyDynamics::Math::SpatialVector& other);
47#endif
48
59 Scalar mx,
60 Scalar my,
61 Scalar mz,
62 Scalar fx,
63 Scalar fy,
64 Scalar fz);
65
66#ifdef BIORBD_USE_CASADI_MATH
71 SpatialVector(const casadi::MX& v);
72
77 SpatialVector(const RBDLCasadiMath::MX_Xd_SubMatrix& m);
78#endif
79
80#ifndef SWIG
85 void operator=(const SpatialVector& other);
86#ifdef BIORBD_USE_EIGEN3_MATH
91 template <typename OtherDerived>
92 SpatialVector& operator=(const Eigen::MatrixBase<OtherDerived>& other) {
93 this->Eigen::Matrix<double, 6, 1>::operator=(other);
94 return *this;
95 }
96#endif
97#ifdef BIORBD_USE_CASADI_MATH
102 void operator=(const RBDLCasadiMath::MX_Xd_SubMatrix& other);
103
108 void operator=(const casadi::MX& other);
109#endif
110
115 utils::Vector3d force() const;
116
121 utils::Vector3d moment() const;
122
123#endif
124};
125
126} // namespace utils
127} // namespace BIORBD_NAMESPACE
128
129#endif // BIORBD_UTILS_SPATIAL_VECTOR_H
Wrapper of the Eigen::Matrix<double, 6, 1> or Casadi::MX(6, 1).
void operator=(const SpatialVector &other)
operator= For submatrices
SpatialVector()
Construct SpatialVector.
utils::Vector3d moment() const
Return the moment part of the vector (first three elements).
utils::Vector3d force() const
Return the force part of the vector (last three elements).
Wrapper around Eigen Vector3d and attach it to a parent.
Definition Vector3d.h:27