Biorbd Release_1.13.0
Loading...
Searching...
No Matches
WrappingSphere.cpp
1#define BIORBD_API_EXPORTS
2#include "InternalForces/WrappingSphere.h"
3
4#include "Utils/RotoTrans.h"
5#include "Utils/String.h"
6
7using namespace BIORBD_NAMESPACE;
8
10 : internal_forces::WrappingObject(),
11 m_dia(std::make_shared<utils::Scalar>(0)) {
12 *m_typeOfNode = utils::NODE_TYPE::WRAPPING_SPHERE;
13}
14
16 const utils::Scalar& x,
17 const utils::Scalar& y,
18 const utils::Scalar& z,
19 const utils::Scalar& diameter)
20 : internal_forces::WrappingObject(x, y, z),
21 m_dia(std::make_shared<utils::Scalar>(diameter))
22
23{
24 *m_typeOfNode = utils::NODE_TYPE::WRAPPING_SPHERE;
25}
26
28 const utils::Scalar& x,
29 const utils::Scalar& y,
30 const utils::Scalar& z,
31 const utils::Scalar& diameter,
32 const utils::String& name,
33 const utils::String& parentName)
34 : internal_forces::WrappingObject(x, y, z, name, parentName),
35 m_dia(std::make_shared<utils::Scalar>(diameter)) {
36 *m_typeOfNode = utils::NODE_TYPE::WRAPPING_SPHERE;
37}
38
40 const utils::Vector3d& v,
41 const utils::Scalar& diameter)
42 : internal_forces::WrappingObject(v),
43 m_dia(std::make_shared<utils::Scalar>(diameter)) {
44 *m_typeOfNode = utils::NODE_TYPE::WRAPPING_SPHERE;
45}
46
53
59
66
67void internal_forces::WrappingSphere::setDiameter(const utils::Scalar& val) {
68 *m_dia = val;
69}
70
71const utils::Scalar& internal_forces::WrappingSphere::diameter() const {
72 return *m_dia;
73}
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.
Sphere object that makes the muscle to wrap around.
void setDiameter(const utils::Scalar &val)
Set the diameter of the wrappping sphere.
WrappingSphere DeepCopy() const
Deep copy of the wrapping sphere.
std::shared_ptr< utils::Scalar > m_dia
Diameter of the wrapping sphere.
const utils::Scalar & diameter() const
Return the diameter of the wrapping sphere.
This is the core of the musculoskeletal model in biorbd.
Definition Joints.h:48
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 DeepCopy() const
Deep copy of a 3D vector.
Definition Vector3d.cpp:68