Biorbd Release_1.13.0
Loading...
Searching...
No Matches
PassiveTorque.h
1#ifndef BIORBD_PASSIVE_TORQUES_PASSIVE_TORQUE_H
2#define BIORBD_PASSIVE_TORQUES_PASSIVE_TORQUE_H
3
4#include "biorbdConfig.h"
5
6#include <memory>
7
8#include "InternalForces/PassiveTorques/PassiveTorqueEnums.h"
9#include "Utils/Scalar.h"
10
11namespace BIORBD_NAMESPACE {
12namespace utils {
13class String;
14}
15namespace internal_forces {
16namespace passive_torques {
17
21class BIORBD_API PassiveTorque {
22 public:
27
32 PassiveTorque(const PassiveTorque& other);
33
38 PassiveTorque(const std::shared_ptr<PassiveTorque> other);
39
44 PassiveTorque(size_t dofIdx);
45
51 PassiveTorque(size_t dofIdx, const utils::String& jointName);
52
56 virtual ~PassiveTorque();
57
62 void DeepCopy(const PassiveTorque& other);
63
68 size_t index() const;
69
74 TORQUE_TYPE type() const;
75
80 virtual utils::Scalar passiveTorque() = 0;
81
82 protected:
86 virtual void setType() = 0;
87
88 std::shared_ptr<TORQUE_TYPE> m_type;
89 std::shared_ptr<utils::String> m_jointName;
90 std::shared_ptr<size_t>
92};
93
94} // namespace passive_torques
95} // namespace internal_forces
96} // namespace BIORBD_NAMESPACE
97
98#endif // BIORBD_PASSIVE_TORQUES_PASSIVE_TORQUE_H
virtual utils::Scalar passiveTorque()=0
Return the passive torque.
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.
virtual void setType()=0
Set the type of passive torque ^.
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