Biorbd
WrappingObject.h
1 #ifndef BIORBD_MUSCLES_WRAPPING_OBJECT_H
2 #define BIORBD_MUSCLES_WRAPPING_OBJECT_H
3 
4 #include "biorbdConfig.h"
5 #include "Utils/Scalar.h"
6 #include "Utils/Vector3d.h"
7 
8 namespace biorbd {
9 namespace utils {
10 class String;
11 }
12 
13 namespace rigidbody {
14 class Joints;
15 class GeneralizedCoordinates;
16 }
17 
18 namespace muscles {
22 class BIORBD_API WrappingObject : public biorbd::utils::Vector3d
23 {
24 public:
29 
37  const biorbd::utils::Scalar& x,
38  const biorbd::utils::Scalar& y,
39  const biorbd::utils::Scalar& z);
49  const biorbd::utils::Scalar& x,
50  const biorbd::utils::Scalar& y,
51  const biorbd::utils::Scalar& z,
52  const biorbd::utils::String &name,
53  const biorbd::utils::String &parentName);
54 
60  const biorbd::utils::Vector3d& other);
61 
69  const biorbd::utils::Vector3d& other,
70  const biorbd::utils::String& name,
71  const biorbd::utils::String& parentName);
72 
77  void DeepCopy(
78  const biorbd::muscles::WrappingObject& other);
79 
89  virtual void wrapPoints(
90  const biorbd::utils::RotoTrans& rt,
91  const biorbd::utils::Vector3d& p1_bone,
92  const biorbd::utils::Vector3d& p2_bone,
95  biorbd::utils::Scalar* muscleLength = nullptr) = 0 ; // Premier et dernier points musculaire
96 
107  virtual void wrapPoints(
110  const biorbd::utils::Vector3d& p1_bone,
111  const biorbd::utils::Vector3d& p2_bone,
114  biorbd::utils::Scalar* muscleLength = nullptr) = 0; // Premier et dernier points musculaire
115 
122  virtual void wrapPoints(
125  biorbd::utils::Scalar* muscleLength = nullptr) = 0; // Assume un appel déja faits
126 
134  virtual const biorbd::utils::RotoTrans& RT(
137  bool updateKin = true) = 0;
138 
143  const biorbd::utils::RotoTrans& RT() const;
144 
149  this->biorbd::utils::Vector3d::operator=(other);
150  return *this;
151  }
152 protected:
153  std::shared_ptr<biorbd::utils::RotoTrans> m_RT;
154 };
155 
156 }}
157 
158 #endif // BIORBD_MUSCLES_WRAPPING_OBJECT_H
biorbd::muscles::WrappingObject::operator=
biorbd::muscles::WrappingObject & operator=(const biorbd::utils::Vector3d &other)
To be able to use the equal "=" operator to define wrapping object.
Definition: WrappingObject.h:148
biorbd::utils::Vector3d
Wrapper around Eigen Vector3d and attach it to a parent.
Definition: Vector3d.h:24
biorbd::rigidbody::GeneralizedCoordinates
Class GeneralizedCoordinates.
Definition: GeneralizedCoordinates.h:15
biorbd::rigidbody::Joints
This is the core of the musculoskeletal model in biorbd.
Definition: Joints.h:40
biorbd::utils::RotoTrans
Homogenous matrix to describe translations and rotations simultaneously.
Definition: RotoTrans.h:34
biorbd::muscles::WrappingObject::RT
virtual const biorbd::utils::RotoTrans & RT(biorbd::rigidbody::Joints &model, const biorbd::rigidbody::GeneralizedCoordinates &Q, bool updateKin=true)=0
Return the RotoTrans matrix of the wrapping object.
biorbd::muscles::WrappingObject::wrapPoints
virtual void wrapPoints(biorbd::rigidbody::Joints &model, const biorbd::rigidbody::GeneralizedCoordinates &Q, const biorbd::utils::Vector3d &p1_bone, const biorbd::utils::Vector3d &p2_bone, biorbd::utils::Vector3d &p1, biorbd::utils::Vector3d &p2, biorbd::utils::Scalar *muscleLength=nullptr)=0
From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping...
biorbd::muscles::WrappingObject
Base class for the wrapping objects.
Definition: WrappingObject.h:23
biorbd::utils::String
Wrapper around the std::string class with augmented functionality.
Definition: String.h:17
biorbd::muscles::WrappingObject::wrapPoints
virtual void wrapPoints(const biorbd::utils::RotoTrans &rt, const biorbd::utils::Vector3d &p1_bone, const biorbd::utils::Vector3d &p2_bone, biorbd::utils::Vector3d &p1, biorbd::utils::Vector3d &p2, biorbd::utils::Scalar *muscleLength=nullptr)=0
From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping...
biorbd::muscles::WrappingObject::m_RT
std::shared_ptr< biorbd::utils::RotoTrans > m_RT
RotoTrans matrix of the wrapping object.
Definition: WrappingObject.h:153
biorbd::muscles::WrappingObject::wrapPoints
virtual void wrapPoints(biorbd::utils::Vector3d &p1, biorbd::utils::Vector3d &p2, biorbd::utils::Scalar *muscleLength=nullptr)=0
Returns the previously computed 2 locations where the muscle leaves the wrapping object.