Biorbd
Release_1.13.0
Toggle main menu visibility
Loading...
Searching...
No Matches
NodeSegment.h
1
#ifndef BIORBD_RIGIDBODY_NODE_SEGMENT_H
2
#define BIORBD_RIGIDBODY_NODE_SEGMENT_H
3
4
#include "biorbdConfig.h"
5
6
#include <vector>
7
8
#include "Utils/Vector3d.h"
9
10
namespace
BIORBD_NAMESPACE {
11
namespace
utils {
12
class
String
;
13
}
14
15
namespace
rigidbody {
16
20
class
BIORBD_API
NodeSegment
:
public
utils::Vector3d
{
21
public
:
25
NodeSegment
();
26
33
NodeSegment
(
34
const
utils::Scalar& x,
35
const
utils::Scalar& y,
36
const
utils::Scalar& z);
37
42
NodeSegment
(
const
utils::Vector3d
& other);
43
56
NodeSegment
(
57
const
utils::Scalar& x,
58
const
utils::Scalar& y,
59
const
utils::Scalar& z,
60
const
utils::String
&
name
,
61
const
utils::String
& parentName,
62
bool
isTechnical
,
63
bool
isAnatomical
,
64
const
utils::String
&
axesToRemove
,
65
int
parentID);
66
77
NodeSegment
(
78
const
utils::Vector3d
& node,
79
const
utils::String
&
name
,
80
const
utils::String
& parentName,
81
bool
isTechnical
,
82
bool
isAnatomical
,
83
const
utils::String
&
axesToRemove
,
84
int
parentID);
85
90
NodeSegment
DeepCopy
()
const
;
91
96
void
DeepCopy
(
const
NodeSegment
& other);
97
98
// Get and Set
99
104
void
setValues
(
const
NodeSegment
& values);
105
110
bool
isTechnical
()
const
;
111
116
bool
isAnatomical
()
const
;
117
122
int
parentId
()
const
;
123
128
const
std::vector<bool>&
axesToRemove
()
const
;
129
134
const
std::vector<bool>
axes
()
const
;
135
141
NodeSegment
removeAxes
()
const
;
142
148
bool
isAxisRemoved
(
size_t
i)
const
;
149
155
bool
isAxisKept
(
size_t
i)
const
;
156
161
std::vector<int>
availableAxesIndices
()
const
;
162
167
void
addAxesToRemove
(
size_t
axisNumber);
168
173
void
addAxesToRemove
(
const
utils::String
& axis);
174
175
#ifndef SWIG
180
void
addAxesToRemove
(
const
std::vector<size_t>&
axes
);
181
#endif
182
187
void
addAxesToRemove
(
const
std::vector<utils::String>&
axes
);
188
193
utils::String
axesToRemoveAsString
()
const
;
194
199
int
nbAxesToRemove
()
const
;
200
201
#ifndef SWIG
202
#ifdef BIORBD_USE_EIGEN3_MATH
207
template
<
typename
OtherDerived>
208
NodeSegment
& operator=(
const
Eigen::MatrixBase<OtherDerived>& other) {
209
this->utils::Vector3d::operator=(other);
210
return
*
this
;
211
}
212
#endif
213
#endif
214
215
protected
:
219
void
setType
();
220
221
std::shared_ptr<std::vector<bool>>
m_axesRemoved
;
222
std::shared_ptr<int>
223
m_nbAxesToRemove
;
226
std::shared_ptr<bool>
m_technical
;
227
std::shared_ptr<bool>
m_anatomical
;
228
std::shared_ptr<int>
m_id
;
229
};
230
231
}
// namespace rigidbody
232
}
// namespace BIORBD_NAMESPACE
233
234
#endif
// BIORBD_RIGIDBODY_NODE_SEGMENT_H
BIORBD_NAMESPACE::rigidbody::NodeSegment::NodeSegment
NodeSegment()
Construct a segment node.
Definition
NodeSegment.cpp:8
BIORBD_NAMESPACE::rigidbody::NodeSegment::m_technical
std::shared_ptr< bool > m_technical
If a marker is a technical marker.
Definition
NodeSegment.h:226
BIORBD_NAMESPACE::rigidbody::NodeSegment::axesToRemoveAsString
utils::String axesToRemoveAsString() const
Return the axes to removed.
Definition
NodeSegment.cpp:181
BIORBD_NAMESPACE::rigidbody::NodeSegment::axesToRemove
const std::vector< bool > & axesToRemove() const
Accessor to axes to remove.
Definition
NodeSegment.cpp:104
BIORBD_NAMESPACE::rigidbody::NodeSegment::isAxisKept
bool isAxisKept(size_t i) const
Check if axis is kept.
Definition
NodeSegment.cpp:130
BIORBD_NAMESPACE::rigidbody::NodeSegment::axes
const std::vector< bool > axes() const
A vector of bool which is the opposite of axesToRemove.
Definition
NodeSegment.cpp:108
BIORBD_NAMESPACE::rigidbody::NodeSegment::DeepCopy
NodeSegment DeepCopy() const
Deep copy of the segment node.
Definition
NodeSegment.cpp:77
BIORBD_NAMESPACE::rigidbody::NodeSegment::isTechnical
bool isTechnical() const
Return if node is technical.
Definition
NodeSegment.cpp:100
BIORBD_NAMESPACE::rigidbody::NodeSegment::setType
void setType()
Set the type of the segment node.
Definition
NodeSegment.cpp:195
BIORBD_NAMESPACE::rigidbody::NodeSegment::setValues
void setValues(const NodeSegment &values)
Set internal values of the node without changing other parameters.
Definition
NodeSegment.cpp:92
BIORBD_NAMESPACE::rigidbody::NodeSegment::removeAxes
NodeSegment removeAxes() const
To remove axis.
Definition
NodeSegment.cpp:116
BIORBD_NAMESPACE::rigidbody::NodeSegment::m_nbAxesToRemove
std::shared_ptr< int > m_nbAxesToRemove
Definition
NodeSegment.h:223
BIORBD_NAMESPACE::rigidbody::NodeSegment::availableAxesIndices
std::vector< int > availableAxesIndices() const
Get all the indices of the axes to keep (X=0, Y=1, Z=2).
Definition
NodeSegment.cpp:134
BIORBD_NAMESPACE::rigidbody::NodeSegment::parentId
int parentId() const
Return the parent index.
Definition
NodeSegment.cpp:102
BIORBD_NAMESPACE::rigidbody::NodeSegment::addAxesToRemove
void addAxesToRemove(size_t axisNumber)
Add an axis to remove.
Definition
NodeSegment.cpp:146
BIORBD_NAMESPACE::rigidbody::NodeSegment::isAnatomical
bool isAnatomical() const
Return if node is anatomical.
Definition
NodeSegment.cpp:98
BIORBD_NAMESPACE::rigidbody::NodeSegment::nbAxesToRemove
int nbAxesToRemove() const
Return the number of axes to remove.
Definition
NodeSegment.cpp:144
BIORBD_NAMESPACE::rigidbody::NodeSegment::m_anatomical
std::shared_ptr< bool > m_anatomical
It marker is a anatomical marker.
Definition
NodeSegment.h:227
BIORBD_NAMESPACE::rigidbody::NodeSegment::m_axesRemoved
std::shared_ptr< std::vector< bool > > m_axesRemoved
The axes to remove.
Definition
NodeSegment.h:221
BIORBD_NAMESPACE::rigidbody::NodeSegment::isAxisRemoved
bool isAxisRemoved(size_t i) const
Check if axis is removed.
Definition
NodeSegment.cpp:126
BIORBD_NAMESPACE::rigidbody::NodeSegment::m_id
std::shared_ptr< int > m_id
The parent identification.
Definition
NodeSegment.h:228
BIORBD_NAMESPACE::utils::Node::name
const String & name() const
Return the name of the node.
Definition
Node.cpp:43
BIORBD_NAMESPACE::utils::String
Wrapper around the std::string class with augmented functionality.
Definition
String.h:18
BIORBD_NAMESPACE::utils::Vector3d
Wrapper around Eigen Vector3d and attach it to a parent.
Definition
Vector3d.h:27
include
RigidBody
NodeSegment.h
Generated by
1.18.0