Biorbd
WrappingObject.cpp
1 #define BIORBD_API_EXPORTS
2 #include "Muscles/WrappingObject.h"
3 
4 #include "Utils/String.h"
5 #include "Utils/RotoTrans.h"
6 
8  biorbd::utils::Vector3d (),
9  m_RT(std::make_shared<biorbd::utils::RotoTrans>())
10 {
11  *m_typeOfNode = biorbd::utils::NODE_TYPE::WRAPPING_OBJECT;
12 }
13 
15  const biorbd::utils::Scalar& x,
16  const biorbd::utils::Scalar& y,
17  const biorbd::utils::Scalar& z) :
18  biorbd::utils::Vector3d(x, y, z),
19  m_RT(std::make_shared<biorbd::utils::RotoTrans>())
20 {
21  *m_typeOfNode = biorbd::utils::NODE_TYPE::WRAPPING_OBJECT;
22 }
23 
25  const biorbd::utils::Scalar& x,
26  const biorbd::utils::Scalar& y,
27  const biorbd::utils::Scalar& z,
28  const biorbd::utils::String &name,
29  const biorbd::utils::String &parentName) :
30  biorbd::utils::Vector3d(x, y, z, name, parentName),
31  m_RT(std::make_shared<biorbd::utils::RotoTrans>())
32 {
33  *m_typeOfNode = biorbd::utils::NODE_TYPE::WRAPPING_OBJECT;
34 }
35 
37  biorbd::utils::Vector3d (other),
38  m_RT(std::make_shared<biorbd::utils::RotoTrans>())
39 {
40  *m_typeOfNode = biorbd::utils::NODE_TYPE::WRAPPING_OBJECT;
41 }
42 
44  const biorbd::utils::Vector3d &other,
45  const biorbd::utils::String &name,
46  const biorbd::utils::String &parentName) :
47  biorbd::utils::Vector3d (other, name, parentName)
48 {
49  *m_typeOfNode = biorbd::utils::NODE_TYPE::WRAPPING_OBJECT;
50 }
51 
53 {
55  *m_RT = *other.m_RT;
56 }
57 
59 {
60  return *m_RT;
61 }
biorbd::utils::Vector3d
Wrapper around Eigen Vector3d and attach it to a parent.
Definition: Vector3d.h:24
biorbd::utils::Vector3d::DeepCopy
biorbd::utils::Vector3d DeepCopy() const
Deep copy of a 3D vector.
Definition: Vector3d.cpp:82
biorbd::muscles::WrappingObject::WrappingObject
WrappingObject()
Construct a wrapping object.
Definition: WrappingObject.cpp:7
biorbd::utils::RotoTrans
Homogenous matrix to describe translations and rotations simultaneously.
Definition: RotoTrans.h:34
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::RT
const biorbd::utils::RotoTrans & RT() const
Return the RotoTrans matrix of the wrapping object.
Definition: WrappingObject.cpp:58
biorbd::muscles::WrappingObject::m_RT
std::shared_ptr< biorbd::utils::RotoTrans > m_RT
RotoTrans matrix of the wrapping object.
Definition: WrappingObject.h:153
biorbd::utils::Node::m_typeOfNode
std::shared_ptr< biorbd::utils::NODE_TYPE > m_typeOfNode
The type of the node.
Definition: Node.h:93