Biorbd Release_1.13.0
Loading...
Searching...
No Matches
PassiveTorque.cpp
1#define BIORBD_API_EXPORTS
2#include "InternalForces/PassiveTorques/PassiveTorque.h"
3
4#include "Utils/Error.h"
5#include "Utils/String.h"
6
7using namespace BIORBD_NAMESPACE;
9 : m_type(
10 std::make_shared<internal_forces::passive_torques::TORQUE_TYPE>(
11 internal_forces::passive_torques::TORQUE_TYPE::NO_TORQUE_TYPE)),
12 m_jointName(std::make_shared<utils::String>("")),
13 m_dofIdx(std::make_shared<size_t>(-1)) {}
14
21 const std::shared_ptr<PassiveTorque> other)
22 : m_type(other->m_type),
24 m_dofIdx(other->m_dofIdx) {}
25
27 : m_type(
28 std::make_shared<internal_forces::passive_torques::TORQUE_TYPE>(
29 internal_forces::passive_torques::TORQUE_TYPE::NO_TORQUE_TYPE)),
30 m_jointName(std::make_shared<utils::String>("")),
31 m_dofIdx(std::make_shared<size_t>(dofIdx)) {}
32
34 size_t dofIdx,
35 const utils::String &jointName)
36 : m_type(
37 std::make_shared<internal_forces::passive_torques::TORQUE_TYPE>(
38 internal_forces::passive_torques::TORQUE_TYPE::NO_TORQUE_TYPE)),
39 m_jointName(std::make_shared<utils::String>(jointName)),
40 m_dofIdx(std::make_shared<size_t>(dofIdx)) {}
41
43
50
54
55internal_forces::passive_torques::TORQUE_TYPE
size_t index() const
Return the index of the DoF associated with passive torque.
void DeepCopy(const PassiveTorque &other)
Deep copy of passive torque.
TORQUE_TYPE type() const
Return the type of the passive torque.
std::shared_ptr< TORQUE_TYPE > m_type
The type of the passive torque.
std::shared_ptr< utils::String > m_jointName
Name of the parent joint.
std::shared_ptr< size_t > m_dofIdx
Index of the DoF associated with the passive torque.
Wrapper around the std::string class with augmented functionality.
Definition String.h:18