Biorbd Release_1.13.0
Loading...
Searching...
No Matches
WrappingObject.h
1#ifndef BIORBD_MUSCLES_WRAPPING_OBJECT_H
2#define BIORBD_MUSCLES_WRAPPING_OBJECT_H
3
4#include "biorbdConfig.h"
5
6#include "Utils/Scalar.h"
7#include "Utils/Vector3d.h"
8
9namespace BIORBD_NAMESPACE {
10namespace utils {
11class String;
12}
13
14namespace rigidbody {
15class Joints;
17} // namespace rigidbody
18
19namespace internal_forces {
23class BIORBD_API WrappingObject : public utils::Vector3d {
24 public:
29
37 const utils::Scalar& x,
38 const utils::Scalar& y,
39 const utils::Scalar& z);
49 const utils::Scalar& x,
50 const utils::Scalar& y,
51 const utils::Scalar& z,
52 const utils::String& name,
53 const utils::String& parentName);
54
59 WrappingObject(const utils::Vector3d& other);
60
68 const utils::Vector3d& other,
69 const utils::String& name,
70 const utils::String& parentName);
71
76 void DeepCopy(const WrappingObject& other);
77
88 virtual void wrapPoints(
89 const utils::RotoTrans& rt,
90 const utils::Vector3d& p1_bone,
91 const utils::Vector3d& p2_bone,
94 utils::Scalar* muscleLength =
95 nullptr) = 0; // Premier et dernier points musculaire
96
108 virtual void wrapPoints(
109 rigidbody::Joints& model,
111 const utils::Vector3d& p1_bone,
112 const utils::Vector3d& p2_bone,
113 utils::Vector3d& p1,
114 utils::Vector3d& p2,
115 utils::Scalar* muscleLength =
116 nullptr) = 0; // Premier et dernier points musculaire
117
125 virtual void wrapPoints(
126 utils::Vector3d& p1,
127 utils::Vector3d& p2,
128 utils::Scalar* muscleLength = nullptr) = 0; // Assume un appel déja faits
129
137 virtual const utils::RotoTrans& RT(
138 rigidbody::Joints& model,
140 bool updateKin = true) = 0;
141
146 const utils::RotoTrans& RT() const;
147
148#ifndef SWIG
154 this->utils::Vector3d::operator=(other);
155 return *this;
156 }
157#endif
158 protected:
159 std::shared_ptr<utils::RotoTrans>
161};
162
163} // namespace internal_forces
164} // namespace BIORBD_NAMESPACE
165
166#endif // BIORBD_MUSCLES_WRAPPING_OBJECT_H
virtual const utils::RotoTrans & RT(rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q, bool updateKin=true)=0
Return the RotoTrans matrix of the wrapping object.
void DeepCopy(const WrappingObject &other)
Deep copy of the wrapping ibject in another wrapping object.
WrappingObject & operator=(const utils::Vector3d &other)
To be able to use the equal "=" operator to define wrapping object.
std::shared_ptr< utils::RotoTrans > m_RT
RotoTrans matrix of the wrapping object.
virtual void wrapPoints(rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q, const utils::Vector3d &p1_bone, const utils::Vector3d &p2_bone, utils::Vector3d &p1, utils::Vector3d &p2, utils::Scalar *muscleLength=nullptr)=0
From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping...
virtual void wrapPoints(utils::Vector3d &p1, utils::Vector3d &p2, utils::Scalar *muscleLength=nullptr)=0
Returns the previously computed 2 locations where the muscle leaves the wrapping object.
virtual void wrapPoints(const utils::RotoTrans &rt, const utils::Vector3d &p1_bone, const utils::Vector3d &p2_bone, utils::Vector3d &p1, utils::Vector3d &p2, utils::Scalar *muscleLength=nullptr)=0
From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping...
This is the core of the musculoskeletal model in biorbd.
Definition Joints.h:48
const String & name() const
Return the name of the node.
Definition Node.cpp:43
Homogenous matrix to describe translations and rotations simultaneously.
Definition RotoTrans.h:33
Wrapper around the std::string class with augmented functionality.
Definition String.h:18
Wrapper around Eigen Vector3d and attach it to a parent.
Definition Vector3d.h:27