Biorbd
Release_1.13.0
Toggle main menu visibility
Loading...
Searching...
No Matches
SegmentCharacteristics.h
1
#ifndef BIORBD_RIGIDBODY_SEGMENT_CHARACTERISTICS_H
2
#define BIORBD_RIGIDBODY_SEGMENT_CHARACTERISTICS_H
3
4
#include "biorbdConfig.h"
5
6
#include <memory>
7
8
#include <rbdl/Body.h>
9
10
#include "Utils/Scalar.h"
11
12
namespace
BIORBD_NAMESPACE {
13
namespace
utils {
14
class
Vector3d
;
15
class
Matrix3d
;
16
}
// namespace utils
17
18
namespace
rigidbody {
19
class
Mesh
;
20
25
#ifdef SWIG
26
class
BIORBD_API
SegmentCharacteristics
27
#else
28
class BIORBD_API
SegmentCharacteristics
:
public
RigidBodyDynamics::Body
29
#endif
30
{
31
public
:
35
SegmentCharacteristics
();
36
43
SegmentCharacteristics
(
44
const
utils::Scalar &
mass
,
45
const
utils::Vector3d
&com,
46
const
utils::Matrix3d
&
inertia
);
47
55
SegmentCharacteristics
(
56
const
utils::Scalar &
mass
,
57
const
utils::Vector3d
&com,
58
const
utils::Matrix3d
&
inertia
,
59
const
Mesh
&
mesh
);
60
65
SegmentCharacteristics
DeepCopy
()
const
;
66
71
void
DeepCopy
(
const
SegmentCharacteristics
&other);
72
77
void
setLength
(
const
utils::Scalar &val);
78
83
utils::Scalar
length
()
const
;
84
89
void
setMass
(
const
utils::Scalar &newMass);
90
95
utils::Scalar
mass
()
const
;
96
102
utils::Vector3d
CoM
()
const
;
103
108
void
setCoM
(
const
utils::Vector3d
&com);
109
114
Mesh
&
mesh
();
115
120
const
Mesh
&
mesh
()
const
;
121
126
const
utils::Matrix3d
inertia
()
const
;
127
132
void
setInertia
(
const
utils::Matrix3d
&
inertia
);
133
134
protected
:
135
std::shared_ptr<utils::Scalar>
m_length
;
136
std::shared_ptr<Mesh>
m_mesh
;
137
};
138
139
}
// namespace rigidbody
140
}
// namespace BIORBD_NAMESPACE
141
142
#endif
// BIORBD_RIGIDBODY_SEGMENT_CHARACTERISTICS_H
BIORBD_NAMESPACE::rigidbody::Mesh
A class that holds the geometry of a segment.
Definition
Mesh.h:22
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics
Characteristics of a segment, namely the mass, the center of mass, the inertia, the length and its me...
Definition
SegmentCharacteristics.h:30
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::setLength
void setLength(const utils::Scalar &val)
Set the segment length.
Definition
SegmentCharacteristics.cpp:46
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::mesh
Mesh & mesh()
Returns the segment mesh.
Definition
SegmentCharacteristics.cpp:68
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::SegmentCharacteristics
SegmentCharacteristics()
Construct segment characteristics.
Definition
SegmentCharacteristics.cpp:12
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::m_length
std::shared_ptr< utils::Scalar > m_length
Length of the segment.
Definition
SegmentCharacteristics.h:135
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::length
utils::Scalar length() const
Returns the segment length.
Definition
SegmentCharacteristics.cpp:50
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::inertia
const utils::Matrix3d inertia() const
Returns the segment inertia matrix.
Definition
SegmentCharacteristics.cpp:74
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::DeepCopy
SegmentCharacteristics DeepCopy() const
Deep copy of the segment characteristics.
Definition
SegmentCharacteristics.cpp:32
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::CoM
utils::Vector3d CoM() const
CoM Returns the position of the center of mass in the local reference frame.
Definition
SegmentCharacteristics.cpp:60
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::m_mesh
std::shared_ptr< Mesh > m_mesh
Mesh of the segment.
Definition
SegmentCharacteristics.h:136
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::mass
utils::Scalar mass() const
Returns the segment mass.
Definition
SegmentCharacteristics.cpp:58
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::setCoM
void setCoM(const utils::Vector3d &com)
setCoM Change the position of the center of mass
Definition
SegmentCharacteristics.cpp:64
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::setMass
void setMass(const utils::Scalar &newMass)
Set the new mass.
Definition
SegmentCharacteristics.cpp:54
BIORBD_NAMESPACE::rigidbody::SegmentCharacteristics::setInertia
void setInertia(const utils::Matrix3d &inertia)
Set the matrix of inertia.
Definition
SegmentCharacteristics.cpp:78
BIORBD_NAMESPACE::utils::Matrix3d
A wrapper for the Eigen::MatrixXd.
Definition
Matrix3d.h:21
BIORBD_NAMESPACE::utils::Vector3d
Wrapper around Eigen Vector3d and attach it to a parent.
Definition
Vector3d.h:27
include
RigidBody
SegmentCharacteristics.h
Generated by
1.18.0