Biorbd Release_1.13.0
Loading...
Searching...
No Matches
PassiveTorqueConstant.cpp
1#define BIORBD_API_EXPORTS
2#include "InternalForces/PassiveTorques/PassiveTorqueConstant.h"
3
4#include "RigidBody/GeneralizedCoordinates.h"
5#include "Utils/String.h"
6
7using namespace BIORBD_NAMESPACE;
8
10 : internal_forces::passive_torques::PassiveTorque(),
11 m_Torque(std::make_shared<utils::Scalar>(0)) {
12 setType();
13}
14
21
23 const utils::Scalar &Torque,
24 size_t dofIdx)
25 : internal_forces::passive_torques::PassiveTorque(dofIdx),
26 m_Torque(std::make_shared<utils::Scalar>(Torque)) {
27 setType();
28}
29
31 const utils::Scalar &Torque,
32 size_t dofIdx,
33 const utils::String &jointName)
34 : internal_forces::passive_torques::PassiveTorque(dofIdx, jointName),
35 m_Torque(std::make_shared<utils::Scalar>(Torque)) {
36 setType();
37}
38
45
51
52utils::Scalar
56
58 *m_type = internal_forces::passive_torques::TORQUE_TYPE::TORQUE_CONSTANT;
59}
Class PassiveTorqueConstant is a joint passive torque type which maximum is contant.
std::shared_ptr< utils::Scalar > m_Torque
Maximal torque that can be done.
virtual void setType()
Set the type of the constant passive torque.
PassiveTorqueConstant DeepCopy() const
Deep copy of the constant passive torque.
void DeepCopy(const PassiveTorque &other)
Deep copy of passive torque.
std::shared_ptr< TORQUE_TYPE > m_type
The type of the passive torque.
Wrapper around the std::string class with augmented functionality.
Definition String.h:18