Biorbd
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
biorbd::rigidbody::NodeSegment Class Reference

A point attached to a segment, generally speaking a skin marker. More...

#include <NodeSegment.h>

Inheritance diagram for biorbd::rigidbody::NodeSegment:
biorbd::utils::Vector3d biorbd::utils::Node

Public Member Functions

 NodeSegment ()
 Construct a segment node.
 
 NodeSegment (const biorbd::utils::Scalar &x, const biorbd::utils::Scalar &y, const biorbd::utils::Scalar &z)
 Construct a segment node. More...
 
 NodeSegment (const biorbd::utils::Vector3d &other)
 Construct a segment node from another node. More...
 
 NodeSegment (const biorbd::utils::Scalar &x, const biorbd::utils::Scalar &y, const biorbd::utils::Scalar &z, const biorbd::utils::String &name, const biorbd::utils::String &parentName, bool isTechnical, bool isAnatomical, const biorbd::utils::String &axesToRemove, int parentID)
 Construct a segment node. More...
 
 NodeSegment (const biorbd::utils::Vector3d &node, const biorbd::utils::String &name, const biorbd::utils::String &parentName, bool isTechnical, bool isAnatomical, const biorbd::utils::String &axesToRemove, int parentID)
 Construct a segment node. More...
 
biorbd::rigidbody::NodeSegment DeepCopy () const
 Deep copy of the segment node. More...
 
void DeepCopy (const biorbd::rigidbody::NodeSegment &other)
 Deep copy of the segment node. More...
 
bool isTechnical () const
 Return if node is technical. More...
 
bool isAnatomical () const
 Return if node is anatomical. More...
 
int parentId () const
 Return the parent index. More...
 
NodeSegment removeAxes () const
 To remove axis. More...
 
bool isAxisRemoved (unsigned int) const
 Check if axis is removed. More...
 
bool isAxisKept (unsigned int) const
 Check if axis is kept. More...
 
void addAxesToRemove (unsigned int axisNumber)
 Add an axis to remove. More...
 
void addAxesToRemove (const biorbd::utils::String &axis)
 Add axis to remove. More...
 
void addAxesToRemove (const std::vector< unsigned int > &axes)
 Add multiple axes to remove. More...
 
void addAxesToRemove (const std::vector< biorbd::utils::String > &axes)
 Add multiple axes to remove. More...
 
biorbd::utils::String axesToRemove ()
 Return the axes to removed. More...
 
int nbAxesToRemove () const
 Return the number of axes to remove. More...
 
- Public Member Functions inherited from biorbd::utils::Vector3d
 Vector3d ()
 Construct 3D vector. More...
 
 Vector3d (const biorbd::utils::Scalar &x, const biorbd::utils::Scalar &y, const biorbd::utils::Scalar &z)
 Construct 3D vector. More...
 
 Vector3d (const biorbd::utils::Scalar &x, const biorbd::utils::Scalar &y, const biorbd::utils::Scalar &z, const biorbd::utils::String &name, const biorbd::utils::String &parentName)
 Construct a 3D vector. More...
 
 Vector3d (const biorbd::utils::Vector3d vec, const biorbd::utils::String &name, const biorbd::utils::String &parentName)
 Construct a 3D vector. More...
 
 Vector3d (const RigidBodyDynamics::Math::Vector3d &other)
 Construct a 3D vector from a Casadi 3D vector (drop the trailling 1) More...
 
 Vector3d (const RigidBodyDynamics::Math::VectorNd &other)
 Construct a 3D vector from a Casadi ND vector (drop the trailling 1) More...
 
 Vector3d (const RigidBodyDynamics::Math::Vector4d &other)
 Construct a 3D vector from an eigen 4D vector (drop the trailling 1) More...
 
biorbd::utils::Vector3d DeepCopy () const
 Deep copy of a 3D vector. More...
 
void DeepCopy (const biorbd::utils::Vector3d &other)
 Deep copy of a 3D vector into another 3D vector. More...
 
biorbd::utils::Vector3d applyRT (const RotoTrans &rt) const
 Apply a RotoTrans to the 3D vector. More...
 
void applyRT (const RotoTrans &rt)
 Apply a RotoTrans to the 3D vector. More...
 
- Public Member Functions inherited from biorbd::utils::Node
 Node ()
 Construct Node.
 
 Node (const biorbd::utils::Node &other)
 Construct Node from another node. More...
 
 Node (const biorbd::utils::String &name)
 Construct Node. More...
 
 Node (const biorbd::utils::String &name, const biorbd::utils::String &parentName)
 Construct Node. More...
 
virtual ~Node ()
 Destroy class properly.
 
void DeepCopy (const biorbd::utils::Node &other)
 Deep copy of the node in another node. More...
 
void setName (const biorbd::utils::String &name)
 Set the name of the node. More...
 
const biorbd::utils::Stringname () const
 Return the name of the node.
 
const biorbd::utils::Stringparent () const
 Return the parent name of the node.
 
void setParent (const biorbd::utils::String &name)
 Set the parent name of the node. More...
 
biorbd::utils::NODE_TYPE typeOfNode () const
 Return the type of node.
 

Protected Member Functions

void setType ()
 Set the type of the segment node.
 

Protected Attributes

std::shared_ptr< std::vector< bool > > m_axesRemoved
 The axes to remove.
 
std::shared_ptr< int > m_nbAxesToRemove
 Removed one of multiple axes (1 axis : project on a plan, 2 axes : project on the 3rd axis, 3 axes : return the position of the parent reference)
 
std::shared_ptr< bool > m_technical
 If a marker is a technical marker.
 
std::shared_ptr< bool > m_anatomical
 It marker is a anatomical marker.
 
std::shared_ptr< int > m_id
 The parent identification.
 
- Protected Attributes inherited from biorbd::utils::Node
std::shared_ptr< biorbd::utils::Stringm_name
 The name of the node.
 
std::shared_ptr< biorbd::utils::Stringm_parentName
 The parent name of the node.
 
std::shared_ptr< biorbd::utils::NODE_TYPE > m_typeOfNode
 The type of the node.
 

Detailed Description

A point attached to a segment, generally speaking a skin marker.

Definition at line 18 of file NodeSegment.h.

Constructor & Destructor Documentation

◆ NodeSegment() [1/4]

biorbd::rigidbody::NodeSegment::NodeSegment ( const biorbd::utils::Scalar &  x,
const biorbd::utils::Scalar &  y,
const biorbd::utils::Scalar &  z 
)

Construct a segment node.

Parameters
xX-Component of the node
yY-Component of the node
zZ-Component of the node

Definition at line 17 of file NodeSegment.cpp.

◆ NodeSegment() [2/4]

biorbd::rigidbody::NodeSegment::NodeSegment ( const biorbd::utils::Vector3d other)

Construct a segment node from another node.

Parameters
otherThe other node

Definition at line 31 of file NodeSegment.cpp.

◆ NodeSegment() [3/4]

biorbd::rigidbody::NodeSegment::NodeSegment ( const biorbd::utils::Scalar &  x,
const biorbd::utils::Scalar &  y,
const biorbd::utils::Scalar &  z,
const biorbd::utils::String name,
const biorbd::utils::String parentName,
bool  isTechnical,
bool  isAnatomical,
const biorbd::utils::String axesToRemove,
int  parentID 
)

Construct a segment node.

Parameters
xX-Component of the node
yY-Component of the node
zZ-Component of the node
nameThe name of the node
parentNameThe name of the parent
isTechnicalIf the node is technical
isAnatomicalIf the node is anatomical
axesToRemoveThe axis to remove
parentIDThe index of the parent segment

Definition at line 42 of file NodeSegment.cpp.

◆ NodeSegment() [4/4]

biorbd::rigidbody::NodeSegment::NodeSegment ( const biorbd::utils::Vector3d node,
const biorbd::utils::String name,
const biorbd::utils::String parentName,
bool  isTechnical,
bool  isAnatomical,
const biorbd::utils::String axesToRemove,
int  parentID 
)

Construct a segment node.

Parameters
nodeThe position of the node
nameThe name of the node
parentNameThe name of the parent
isTechnicalIf the node is technical
isAnatomicalIf the node is anatomical
axesToRemoveThe axis to remove
parentIDThe index of the parent segment

Definition at line 62 of file NodeSegment.cpp.

Member Function Documentation

◆ addAxesToRemove() [1/4]

void biorbd::rigidbody::NodeSegment::addAxesToRemove ( const biorbd::utils::String axis)

Add axis to remove.

Parameters
axisThe name of the axis to remove ("x", "y" or "z")

Definition at line 154 of file NodeSegment.cpp.

◆ addAxesToRemove() [2/4]

void biorbd::rigidbody::NodeSegment::addAxesToRemove ( const std::vector< biorbd::utils::String > &  axes)

Add multiple axes to remove.

Parameters
axesThe multiples axes names to remove ("x", "y" or "z")

Definition at line 173 of file NodeSegment.cpp.

◆ addAxesToRemove() [3/4]

void biorbd::rigidbody::NodeSegment::addAxesToRemove ( const std::vector< unsigned int > &  axes)

Add multiple axes to remove.

Parameters
axesThe multiples axes numbers to remove (x = 0, y = 1 and z = 2)

Definition at line 167 of file NodeSegment.cpp.

◆ addAxesToRemove() [4/4]

void biorbd::rigidbody::NodeSegment::addAxesToRemove ( unsigned int  axisNumber)

Add an axis to remove.

Parameters
axisNumberThe axis number to remove (x = 0, y = 1 and z = 2)

Definition at line 146 of file NodeSegment.cpp.

◆ axesToRemove()

biorbd::utils::String biorbd::rigidbody::NodeSegment::axesToRemove ( )

Return the axes to removed.

Returns
The axes to removed

Definition at line 179 of file NodeSegment.cpp.

◆ DeepCopy() [1/2]

biorbd::rigidbody::NodeSegment biorbd::rigidbody::NodeSegment::DeepCopy ( ) const

Deep copy of the segment node.

Returns
A deep copy of the segment node

Definition at line 81 of file NodeSegment.cpp.

◆ DeepCopy() [2/2]

void biorbd::rigidbody::NodeSegment::DeepCopy ( const biorbd::rigidbody::NodeSegment other)

Deep copy of the segment node.

Parameters
otherThe segment node to copy

Definition at line 88 of file NodeSegment.cpp.

◆ isAnatomical()

bool biorbd::rigidbody::NodeSegment::isAnatomical ( ) const

Return if node is anatomical.

Returns
If node is anatomical

Definition at line 99 of file NodeSegment.cpp.

◆ isAxisKept()

bool biorbd::rigidbody::NodeSegment::isAxisKept ( unsigned int  i) const

Check if axis is kept.

Returns
If axis is kept or not

Definition at line 131 of file NodeSegment.cpp.

◆ isAxisRemoved()

bool biorbd::rigidbody::NodeSegment::isAxisRemoved ( unsigned int  i) const

Check if axis is removed.

Returns
If axis is removed or not

Definition at line 126 of file NodeSegment.cpp.

◆ isTechnical()

bool biorbd::rigidbody::NodeSegment::isTechnical ( ) const

Return if node is technical.

Returns
If node is technical

Definition at line 106 of file NodeSegment.cpp.

◆ nbAxesToRemove()

int biorbd::rigidbody::NodeSegment::nbAxesToRemove ( ) const

Return the number of axes to remove.

Returns
The number of axes to remove

Definition at line 136 of file NodeSegment.cpp.

◆ parentId()

int biorbd::rigidbody::NodeSegment::parentId ( ) const

Return the parent index.

Returns
The parent index

Definition at line 112 of file NodeSegment.cpp.

◆ removeAxes()

biorbd::rigidbody::NodeSegment biorbd::rigidbody::NodeSegment::removeAxes ( ) const

To remove axis.

Returns
Projected position of the node when removing speficic axes speficied using addAxesToRemove

Definition at line 117 of file NodeSegment.cpp.


The documentation for this class was generated from the following files: