Biorbd
Release_1.13.0
Toggle main menu visibility
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
9
namespace
BIORBD_NAMESPACE {
10
namespace
utils {
11
class
String
;
12
}
13
14
namespace
rigidbody {
15
class
Joints
;
16
class
GeneralizedCoordinates
;
17
}
// namespace rigidbody
18
19
namespace
internal_forces {
23
class
BIORBD_API
WrappingObject
:
public
utils::Vector3d
{
24
public
:
28
WrappingObject
();
29
36
WrappingObject
(
37
const
utils::Scalar& x,
38
const
utils::Scalar& y,
39
const
utils::Scalar& z);
48
WrappingObject
(
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
67
WrappingObject
(
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,
92
utils::Vector3d
& p1,
93
utils::Vector3d
& p2,
94
utils::Scalar* muscleLength =
95
nullptr
) = 0;
// Premier et dernier points musculaire
96
108
virtual
void
wrapPoints
(
109
rigidbody::Joints
& model,
110
const
rigidbody::GeneralizedCoordinates
& Q,
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,
139
const
rigidbody::GeneralizedCoordinates
& Q,
140
bool
updateKin =
true
) = 0;
141
146
const
utils::RotoTrans
&
RT
()
const
;
147
148
#ifndef SWIG
153
WrappingObject
&
operator=
(
const
utils::Vector3d
& other) {
154
this->utils::Vector3d::operator=(other);
155
return
*
this
;
156
}
157
#endif
158
protected
:
159
std::shared_ptr<utils::RotoTrans>
160
m_RT
;
161
};
162
163
}
// namespace internal_forces
164
}
// namespace BIORBD_NAMESPACE
165
166
#endif
// BIORBD_MUSCLES_WRAPPING_OBJECT_H
BIORBD_NAMESPACE::internal_forces::WrappingObject::RT
virtual const utils::RotoTrans & RT(rigidbody::Joints &model, const rigidbody::GeneralizedCoordinates &Q, bool updateKin=true)=0
Return the RotoTrans matrix of the wrapping object.
BIORBD_NAMESPACE::internal_forces::WrappingObject::WrappingObject
WrappingObject()
Construct a wrapping object.
Definition
WrappingObject.cpp:9
BIORBD_NAMESPACE::internal_forces::WrappingObject::DeepCopy
void DeepCopy(const WrappingObject &other)
Deep copy of the wrapping ibject in another wrapping object.
Definition
WrappingObject.cpp:54
BIORBD_NAMESPACE::internal_forces::WrappingObject::operator=
WrappingObject & operator=(const utils::Vector3d &other)
To be able to use the equal "=" operator to define wrapping object.
Definition
WrappingObject.h:153
BIORBD_NAMESPACE::internal_forces::WrappingObject::m_RT
std::shared_ptr< utils::RotoTrans > m_RT
RotoTrans matrix of the wrapping object.
Definition
WrappingObject.h:160
BIORBD_NAMESPACE::internal_forces::WrappingObject::wrapPoints
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...
BIORBD_NAMESPACE::internal_forces::WrappingObject::wrapPoints
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.
BIORBD_NAMESPACE::internal_forces::WrappingObject::wrapPoints
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...
BIORBD_NAMESPACE::rigidbody::GeneralizedCoordinates
Class GeneralizedCoordinates.
Definition
GeneralizedCoordinates.h:15
BIORBD_NAMESPACE::rigidbody::Joints
This is the core of the musculoskeletal model in biorbd.
Definition
Joints.h:48
BIORBD_NAMESPACE::utils::Node::name
const String & name() const
Return the name of the node.
Definition
Node.cpp:43
BIORBD_NAMESPACE::utils::RotoTrans
Homogenous matrix to describe translations and rotations simultaneously.
Definition
RotoTrans.h:33
BIORBD_NAMESPACE::utils::String
Wrapper around the std::string class with augmented functionality.
Definition
String.h:18
BIORBD_NAMESPACE::utils::Vector3d
Wrapper around Eigen Vector3d and attach it to a parent.
Definition
Vector3d.h:27
include
InternalForces
WrappingObject.h
Generated by
1.18.0