Biorbd
Release_1.13.0
Toggle main menu visibility
Loading...
Searching...
No Matches
IMU.cpp
1
#define BIORBD_API_EXPORTS
2
#include "RigidBody/IMU.h"
3
4
#include "Utils/String.h"
5
6
using namespace
BIORBD_NAMESPACE;
7
8
rigidbody::IMU::IMU
(
bool
isTechnical
,
bool
isAnatomical
)
9
: utils::
RotoTransNode
(),
10
m_technical
(std::make_shared<bool>(
isTechnical
)),
11
m_anatomical
(std::make_shared<bool>(
isAnatomical
)) {}
12
13
rigidbody::IMU::IMU
(
14
const
utils::RotoTransNode
&
RotoTrans
,
15
bool
isTechnical
,
16
bool
isAnatomical
)
17
: utils::
RotoTransNode
(
RotoTrans
),
18
m_technical
(std::make_shared<bool>(
isTechnical
)),
19
m_anatomical
(std::make_shared<bool>(
isAnatomical
)) {}
20
21
#ifdef BIORBD_USE_CASADI_MATH
22
23
rigidbody::IMU::IMU
(
const
rigidbody::IMU
&imu)
24
: utils::RotoTransNode(imu),
25
m_technical(std::make_shared<bool>(*imu.m_technical)),
26
m_anatomical(std::make_shared<bool>(*imu.m_anatomical)) {}
27
28
rigidbody::IMU
rigidbody::IMU::operator*
(
const
rigidbody::IMU
&other)
const
{
29
return
rigidbody::IMU
(
30
utils::RotoTransNode
(
31
this->utils::RotoTransNode::operator*(other),
32
this->
utils::Node::name
(),
33
this->parent()),
34
this->isTechnical() && other.
isTechnical
(),
35
this->isAnatomical() && other.
isAnatomical
());
36
}
37
38
#endif
39
40
rigidbody::IMU
rigidbody::IMU::DeepCopy
()
const
{
41
rigidbody::IMU
copy;
42
copy.
DeepCopy
(*
this
);
43
return
copy;
44
}
45
46
void
rigidbody::IMU::DeepCopy
(
const
IMU
&other) {
47
utils::RotoTransNode::DeepCopy
(other);
48
*
m_technical
= *other.
m_technical
;
49
*
m_anatomical
= *other.
m_anatomical
;
50
}
51
52
bool
rigidbody::IMU::isAnatomical
()
const
{
return
*
m_anatomical
; }
53
54
bool
rigidbody::IMU::isTechnical
()
const
{
return
*
m_technical
; }
BIORBD_NAMESPACE::rigidbody::IMU
Class IMU.
Definition
IMU.h:25
BIORBD_NAMESPACE::rigidbody::IMU::IMU
IMU(bool isTechnical=true, bool isAnatomical=true)
Construct inertial measurement unit.
Definition
IMU.cpp:8
BIORBD_NAMESPACE::rigidbody::IMU::DeepCopy
IMU DeepCopy() const
Deep copy of the IMU data.
Definition
IMU.cpp:40
BIORBD_NAMESPACE::rigidbody::IMU::m_anatomical
std::shared_ptr< bool > m_anatomical
It IMU is a anatomical IMU.
Definition
IMU.h:100
BIORBD_NAMESPACE::rigidbody::IMU::isTechnical
bool isTechnical() const
Return if the IMU is technical.
Definition
IMU.cpp:54
BIORBD_NAMESPACE::rigidbody::IMU::isAnatomical
bool isAnatomical() const
Return if the IMU is anatomical.
Definition
IMU.cpp:52
BIORBD_NAMESPACE::rigidbody::IMU::m_technical
std::shared_ptr< bool > m_technical
If a IMU is a technical IMU.
Definition
IMU.h:99
BIORBD_NAMESPACE::utils::Node::name
const String & name() const
Return the name of the node.
Definition
Node.cpp:43
BIORBD_NAMESPACE::utils::RotoTransNode
A RotoTrans which is attached to a segment.
Definition
RotoTransNode.h:17
BIORBD_NAMESPACE::utils::RotoTransNode::DeepCopy
RotoTransNode DeepCopy() const
Deep copy of a RotoTransNode.
Definition
RotoTransNode.cpp:20
BIORBD_NAMESPACE::utils::RotoTransNode::RotoTransNode
RotoTransNode()
Construct a RotoTransNode.
Definition
RotoTransNode.cpp:8
BIORBD_NAMESPACE::utils::RotoTransNode::operator*
RotoTrans operator*(const RotoTransNode &other) const
operator* Matrix multiplication
Definition
RotoTransNode.cpp:39
BIORBD_NAMESPACE::utils::RotoTrans::RotoTrans
RotoTrans(const RigidBodyDynamics::Math::Matrix4d &matrix=RigidBodyDynamics::Math::Matrix4d::Identity())
Construct RotoTrans matrix.
Definition
RotoTrans.cpp:14
src
RigidBody
IMU.cpp
Generated by
1.18.0