Biorbd Release_1.13.0
Loading...
Searching...
No Matches
WrappingObject.cpp
1#define BIORBD_API_EXPORTS
2#include "InternalForces/WrappingObject.h"
3
4#include "Utils/RotoTrans.h"
5#include "Utils/String.h"
6
7using namespace BIORBD_NAMESPACE;
8
10 : utils::Vector3d(), m_RT(std::make_shared<utils::RotoTrans>()) {
11 *m_typeOfNode = utils::NODE_TYPE::WRAPPING_OBJECT;
12}
13
15 const utils::Scalar &x,
16 const utils::Scalar &y,
17 const utils::Scalar &z)
18 : utils::Vector3d(x, y, z), m_RT(std::make_shared<utils::RotoTrans>()) {
19 *m_typeOfNode = utils::NODE_TYPE::WRAPPING_OBJECT;
20}
21
23 const utils::Scalar &x,
24 const utils::Scalar &y,
25 const utils::Scalar &z,
26 const utils::String &name,
27 const utils::String &parentName)
28 : utils::Vector3d(x, y, z, name, parentName),
29 m_RT(std::make_shared<utils::RotoTrans>()) {
30 *m_typeOfNode = utils::NODE_TYPE::WRAPPING_OBJECT;
31}
32
34 : utils::Vector3d(other) {
35 try {
38 dynamic_cast<const internal_forces::WrappingObject &>(other)));
39 m_RT = otherWrap.m_RT;
40 } catch (const std::bad_cast &) {
41 m_RT = std::make_shared<utils::RotoTrans>();
42 }
43}
44
46 const utils::Vector3d &other,
47 const utils::String &name,
48 const utils::String &parentName)
49 : utils::Vector3d(other, name, parentName),
50 m_RT(std::make_shared<utils::RotoTrans>()) {
51 *m_typeOfNode = utils::NODE_TYPE::WRAPPING_OBJECT;
52}
53
59
Base class for the wrapping objects.
std::shared_ptr< utils::RotoTrans > m_RT
RotoTrans matrix of the wrapping object.
const utils::RotoTrans & RT() const
Return the RotoTrans matrix of the wrapping object.
const String & name() const
Return the name of the node.
Definition Node.cpp:43
std::shared_ptr< NODE_TYPE > m_typeOfNode
The type of the node.
Definition Node.h:92
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
Vector3d()
Construct 3D vector.
Definition Vector3d.cpp:9
Vector3d DeepCopy() const
Deep copy of a 3D vector.
Definition Vector3d.cpp:68